Updated: April 19, 2023 |
Run a callback to resume processing of a paused message
#include <sys/iofunc.h> #include <sys/resmgr.h> #include <sys/dispatch.h> int resmgr_pause_resume( resmgr_context_t *const ctp, RESMGR_OCB_T *const ocb, int (*callback)(resmgr_context_t *ctp, RESMGR_OCB_T *const ocb, void *private_data) );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The resmgr_pause_resume() function searches the queue of paused messages for an entry that matches the ctp->rcvid value. If an entry is found, the specified callback is called to resume processing of the message.
This function is used by a resource manager's unpause handler to fetch the queued data from the previous remsgr_pause_queue() call and run the provided callback with this data. The data's memory is deleted when the callback completes.
On success, the result of the callback is returned. If the function failed because no matching queue entry was found, ENOENT is returned.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |