libk  Diff

Differences From Artifact [aa4095c969]:

To Artifact [e3d3c3c357]:


    39     39   	kiostream in;
    40     40   	  // text can be read from this stream
    41     41   	kiostream out;
    42     42   	  // text can be written to this stream
    43     43   } kiochan;
    44     44   
    45     45   typedef enum kiocond {
    46         -	kiocond_ok,
    47         -	  // success
    48         -    kiocond_fail,
    49         -	  // action failed
           46  +	/* to check if a call failed, perform (x >= kiocond_fail) where x
           47  +	 * is that call's return value. more typically however you should
           48  +	 * select explicitly against kiocond_ok or kiocond_partial, since
           49  +	 * those situations will usually need to be handled differently. */
           50  +
           51  +	kiocond_ok, // success
           52  +	kiocond_partial, // partial read or write
           53  +
           54  +    kiocond_fail, // action failed - unspecified reason
           55  +	kiocond_fail_closed_stream, // action failed because stream is closed
    50     56   } kiocond;
    51     57   
    52     58   kiocond kiosend(kiochan, ksraw, sz*); // send data to a channel
    53     59   kiocond kiorecv(kiochan, ksraw*); // receive data from a channel
    54     60   kmptr kiorecvall(kiochan, kmcell*, kmkind); // automatically allocate a bufer for a channel
    55     61     // kmkind is only used if kmcell* is NULL
    56     62   kiocond kiocon(kiochan, kiochan); // connect one channel to another
    57     63   
    58     64   #endif