libk  Diff

Differences From Artifact [8ac183a3d1]:

To Artifact [d3b54028db]:


    53     53   	/* to check if a call failed, perform (x >= kiocond_fail) where x
    54     54   	 * is that call's return value. more typically however you should
    55     55   	 * select explicitly against kiocond_ok or kiocond_partial, since
    56     56   	 * those situations will usually need to be handled differently. */
    57     57   
    58     58   	kiocond_ok, // success
    59     59   	kiocond_partial, // partial read or write
           60  +	kiocond_poll, // call would block
           61  +	kiocond_interrupt, // call was interrupted by signal
    60     62   
    61     63       kiocond_fail, // action failed - unspecified reason
    62     64   	kiocond_fail_closed_stream, // action failed because stream is closed
           65  +	kiocond_fail_invalid,
           66  +	kiocond_fail_io,
           67  +	kiocond_fail_no_peer,
           68  +	kiocond_fail_no_space,
           69  +	kiocond_fail_forbidden,
           70  +	kiocond_fail_over_quota,
           71  +	kiocond_fail_pfault,
           72  +	kiocond_fail_too_big,
           73  +	kiocond_fail_stream_mismatch,
    63     74   } kiocond;
    64     75   
    65     76   kiocond kiosend(kiochan, ksraw, sz*); // send data to a channel
    66     77   kiocond kiorecv(kiochan, ksraw*); // receive data from a channel
    67     78   kmptr kiorecvall(kiochan, kmcell*, kmkind); // automatically allocate a bufer for a channel
    68     79     // kmkind is only used if kmcell* is null
    69     80   kiocond kiocon(kiochan, kiochan); // connect one channel to another
    70     81   
    71     82   #ifdef __cplusplus
    72     83   }
    73     84   #endif
    74     85   
    75     86   #endif