getq(D3)
getq - get the next message from a queue
As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.
NAME getq - get the next message from a queue SYNOPSIS #include <sys/stream.h> #include <sys/ddi.h> mblk_t *getq(queue_t *q); Arguments q Pointer to the queue from which the message is to be retrieved. DESCRIPTION getq gets the next available message from the top of the queue pointed to by q. It handles flow control, restarting I/O that was blocked as needed. Return Values If there is a message to retrieve, getq returns a pointer to it. If no message is queued, getq returns a NULL pointer. USAGE getq is typically used by service routines [see srv(D2)] to retrieve queued messages. 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 srv(D2) for an example of getq. REFERENCES bcanput(D3), canput(D3), putbq(D3), putq(D3), qenable(D3), rmvq(D3), srv(D2)