C Collections

cthreadcomm · Section 3

cchan_enable_sending

cchan_enable_sending - turn on sends on a cchan direction

C Collections (libccollections, -lccollections)

#include <ccollections/cthreadcomm.h>
 
ccol_retval cchan_enable_sending(cchan *ch, cchan_direction d);

Turns sends back on for one direction of the channel after
cchan_disable_sending() turned them off, and wakes every thread
that is blocked waiting to send.

ch   Channel to change
d    Direction that gets sends turned on (cchan_owner_to_workers or
     cchan_workers_to_owner)

ccol_success       - Sends are on again
ccol_invalid_args  - ch is NULL, or d is not valid

Every blocked sender is woken with a broadcast, so a sender can try
again at once if the queue has free space. The other direction is left
as it is.

cchan_disable_sending(3)