Updated: April 19, 2023 |
Request to pause a message
#include <sys/iofunc.h> #include <sys/resmgr.h> #include <sys/dispatch.h> int resmgr_pause_queue( resmgr_context_t *const ctp, const void *const private_data, const size_t extra_size );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The resmgr_pause_queue() function adds a request to pause the message indicated by ctp->rcvid to a queue of paused messages. This function is used by resource managers for message pausing in deadlock (EDEADLK) situations. For an explanation of how this type of error can occur, see MsgPause(), MsgPause_r().
This function and resmgr_pause_resume() work as a pair. Your server must call this latter function after receiving notification from the kernel through a _PULSE_CODE_RESTART pulse that the deadlock has been avoided; usually this is in your resource manager's unpause handler.
If extra_size is 0, then private_data is passed to the callback as is. If extra_size is not 0, then this amount of space is allocated for the callback data buffer and the contents of private_data are copied into this buffer. The caller is not responsible for freeing this memory.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |