getq man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

GETQ(9F)							      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
       The getq() function 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
       The getq() function can be called from user, interrupt, or kernel  con‐
       text.

EXAMPLES
       See dupb(9F).

SEE ALSO
       srv(9E),	 bcanput(9F),  canput(9F), dupb(9F), putbq(9F), putq(9F), qen‐
       able(9F)

       Writing Device Drivers

       STREAMS Programming Guide

				 Jan 16, 2006			      GETQ(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net