[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    putbq(9F) manual page Table of Contents

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).

Arguments

q
Pointer to the queue.
bp
Pointer to the message block.

Description

putbq() places a message at the beginning of the appropriate 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 message 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) determines that the message cannot be passed on to the next stream component. 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

putbq() returns 1 on success and 0 on failure.

Context

putbq() can be called from user or interrupt context.

Example

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

See Also

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



Table of Contents