bps_channel_push_event()
Posts an event to the selected channel.
Synopsis:
#include <bps/bps.h>
BPS_API int bps_channel_push_event(int chid, bps_event_t *event)
Arguments:
- chid
- The event channel to push the event onto.
- event
- The event to post to the event queue.
Library:libbps
Description:
The bps_channel_push_event() function allows an application to post an event to any channel. You can use the bps_event_create() function to create a custom event in your application, and then use the bps_channel_push_event(chid, event) function to add the event to a channel that isn't currently active, or owned by the thread.
You can also use this function to dispatch an event to a different channel than the channel the event originated on. This makes passing events off to a different thread possible. In order for the transfer of event ownership to work properly, the active channel should be the same channel that the event was originally retrieved from.
Returns:
BPS_SUCCESS when the function completes successfully, BPS_FAILURE with the errno value set otherwise.