Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getq(9r) [osf1 man page]

getq(9r)																  getq(9r)

NAME
getq - STREAMS: Gets a message from the front of the queue SYNOPSIS
#include <sys/stream.h> MBLKP getq( queue_t *message_queue ); ARGUMENTS
Specifies a pointer to the message queue from which the message is to be retrieved. The typedef queue_t is an alternate name for struct queue_entry *. DESCRIPTION
The getq interface is used by a service interface to retrieve its enqueued messages. A module or driver may include a service interface to process enqueued messages. Once the STREAMS scheduler calls this service it must process all enqueued messages, unless prevented by flow control. The getq interface gets the next available message from the top of the queue pointed to by the message_queue argument. You should call getq in a while loop that should be exited only when there are no more mes- sages. 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. SEE ALSO
Kernel Interfaces: bcanput(9r), canput(9r), putbq(9r), putq(9r), qenable(9r) Programmer's Guide: STREAMS getq(9r)

Check Out this Related Man Page

getq(9F)						   Kernel Functions for Drivers 						  getq(9F)

NAME
getq - get the next message from a queue SYNOPSIS
#include <sys/stream.h> mblk_t *getq(queue_t *q); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the queue from which the message is to be retrieved. DESCRIPTION
getq() is used by a service ( srv(9E)) routine to retrieve its enqueued messages. A module or driver may include a service routine to process enqueued messages. Once the STREAMS scheduler calls srv() it must process all enqueued messages, unless prevented by flow control. getq() obtains the next available message from the top of the queue pointed to by q. It should be called in a while loop that is exited only when there are no more messages or flow control prevents further processing. If an attempt was made to write to the queue while it was blocked by flow control, getq() back-enables (restarts) the service routine once it falls below the low water mark. 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. CONTEXT
getq() can be called from user or interrupt context. EXAMPLES
See dupb(9F). SEE ALSO
srv(9E), bcanput(9F), canput(9F), dupb(9F), putbq(9F), putq(9F), qenable(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 12 Nov 1992 getq(9F)
Man Page