cthreadcomm · Section 3
cchan_enable_sending
NAME
cchan_enable_sending - turn on sends on a cchan direction
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadcomm.h> ccol_retval cchan_enable_sending(cchan *ch, cchan_direction d);
DESCRIPTION
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.
PARAMETERS
ch Channel to change
d Direction that gets sends turned on (cchan_owner_to_workers or
cchan_workers_to_owner)
RETURN VALUE
ccol_success - Sends are on again ccol_invalid_args - ch is NULL, or d is not valid
NOTES
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.