resmgr_pause_resume()
Run a callback to resume processing of a paused message
Synopsis:
#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) );
Arguments:
- ctp
- A pointer to a resmgr_context_t structure that the resource manager library uses to pass context information between functions.
- ocb
- A pointer to the iofunc_ocb_t structure for the Open Control Block that was created when the client opened the resource.
- callback
- A pointer to the callback function to run. This function will be passed the data that was stored in the private_data argument when resmgr_pause_queue() was called, the OCB structure pointer in ocb, and the context pointer in ctp.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
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.
Returns:
On success, the result of the callback is returned. If the function failed because no matching queue entry was found, ENOENT is returned.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | No |
Thread | Yes |