STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
208
NAME
rmvq () – Removes a message from a queue.
SYNOPSIS
#include <sys/stream.h>
void *rmvq (queue_t *q, mblk_t *mp);
PARAMETERS
q
Pointer to the queue from which a message is to be removed.
mp
Pointer to the message targeted for removal.
DESCRIPTION
rmvq() removes a message pointed to by
mp
from the queue specified by
q
. All flow control parameters for the
queue are appropriately updated. If
mp
is not a valid message pointer for this queue, the results can
unpredictable.
A queue belonging to a module/driver with a synchronization level of SQLVL_NOSYNC may be simultaneously
manipulated by multiple threads. Therefore, the queue specified by
q
must be frozen by calling freezestr()
before calling insq(), rmvq(), strqget(), and strqset(). A call to unfreezestr() must be made to
unfreeze the queue after the above operations are complete.
RETURN VALUES
None
CONSTRAINTS
rmvq() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order can be
held across this call.