bps_channel_set_active()
Sets the thread's active channel.
Synopsis:
#include <bps/bps.h>
BPS_API int bps_channel_set_active(int chid)
Arguments:
- chid
- A channel ID supplied by a previous call to the bps_channel_create() function.
Library:
libbpsDescription:
The active channel for a thread determines which channel subsequent calls affect. Calls to various functions, such as the bps_get_event() , bps_push_event() , bps_add_fd() functions, work on the active channel. In addition, several service functions affect the active channel. Typically, function names that end in _request_events() adds a service's file descriptor to the active channel so that the events will start to enter the active channel's event queue.
A call to the bps_channel_set_active() function is only necessary when the application has created a channel using the bps_channel_create() function. A call to the bps_initialize() function creates a default channel, and that default channel is set as the active channel.
Returns:
The previous active channel ID, BPS_FAILURE with the errno value set otherwise.