putq(D3)putq(D3)NAMEputq - put a message on a queue
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
int putq(queue_t *q, mblk_t *bp);
Arguments
q Pointer to the queue.
bp Pointer to the message.
DESCRIPTIONputq is used to put messages on a queue after the put(D2) routine has
finished processing the message. The message is placed after any other
messages of the same priority, and flow control parameters are updated.
The queue's service routine is scheduled if it has not been disabled by a
previous call to noenable(D3), or if the message being enqueued has
greater than normal priority (that is, it is not in band zero).
Return Values
putq returns 1 on success and 0 on failure.
USAGEputq can fail if there is not enough memory to allocate the accounting
data structures used with messages whose priority bands are greater than
zero.
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
Examples
See datamsg(D3) for an example of putq.
REFERENCESgetq(D3), insq(D3), msgb(D4), put(D2), putbq(D3), queue(D4), rmvq(D3),
srv(D2)
Page 1