putbq man page on SmartOS

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

PUTBQ(9F)							     PUTBQ(9F)

NAME
       putbq - place a message at the head of a queue

SYNOPSIS
       #include <sys/stream.h>

       int putbq(queue_t *q, mblk_t *bp);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/DKI).

PARAMETERS
       q
	     Pointer to the queue.

       bp
	     Pointer to the message block.

DESCRIPTION
       The putbq() function places a message at the beginning of the appropri‐
       ate section of the message queue. There are always  sections  for  high
       priority	 and ordinary messages. If other priority bands are used, each
       will have its own section of the queue, in priority band	 order,	 after
       high  priority  messages	 and  before ordinary messages. putbq() can be
       used for ordinary, priority band, and high priority messages.  However,
       unless  precautions  are taken, using putbq() with a high priority mes‐
       sage is likely to lead to an infinite loop of putting the message  back
       on  the	queue,	being rescheduled, pulling it off, and putting it back
       on.

       This function is usually called when bcanput(9F) or  canput(9F)	deter‐
       mines  that  the	 message cannot be passed on to the next stream compo‐
       nent.  The flow control parameters are updated to reflect the change in
       the  queue's  status.  If  QNOENB  is  not  set, the service routine is
       enabled.

RETURN VALUES
       The putbq() function returns 1 upon success and 0 upon failure.

       Upon failure, the caller should call freemsg(9F) to free the pointer to
       the message block.

CONTEXT
       The putbq() function can be called from user, interrupt, or kernel con‐
       text.

EXAMPLES
       See the bufcall(9F) function page for an example of putbq().

SEE ALSO
       bcanput(9F), bufcall(9F), canput(9F), getq(9F), putq(9F)

       Writing Device Drivers

       STREAMS Programming Guide

				 Jan 16, 2006			     PUTBQ(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