6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
* kiosend() writes to a channel with an open out stream
*/
/* we define all platform functions here,
* whether or not they're for the correct
* platform - only the ones actually called
* by the generated code will be linked */
#include <posix.h>
#include <error_table.h>
kiocond kiosend(kiochan target, ksraw string, sz* len) {
if (target.out.kind == kiostream_closed) return kiocond_fail_closed_stream;
# ifdef KFenv_posix
/* issue the write syscall here and now so we can
|
|
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
* kiosend() writes to a channel with an open out stream
*/
/* we define all platform functions here,
* whether or not they're for the correct
* platform - only the ones actually called
* by the generated code will be linked */
#include <posix/posix.h>
#include <error_table.h>
kiocond kiosend(kiochan target, ksraw string, sz* len) {
if (target.out.kind == kiostream_closed) return kiocond_fail_closed_stream;
# ifdef KFenv_posix
/* issue the write syscall here and now so we can
|