putbq(9r)putbq(9r)NAMEputbq - STREAMS: Places a message at the head of a queue
SYNOPSIS
#include <sys/stream.h>
int putbq(
queue_t *queue_pointer,
MBLKP message_block_ptr );
ARGUMENTS
Specifies a pointer to the queue. The typedef queue_t is an alternate
name for struct queue_entry *. Specifies a pointer to the message
block. The typedef MBLKP is an alternate name for typedef struct msgb
*.
DESCRIPTION
The putbq interface 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. You can use putbq
only for ordinary and priority band messages. High priority messages
are not subject to flow-control and thus cannot be put back on the
queue.
Typically, you call putbq when the bcanput or canput interface 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 the QNOENB flag bit is not set, putbq enables
the service interface.
RETURN VALUES
Upon successful completion, putbq returns the value 1. On failure, it
returns the value zero (0).
SEE ALSO
Kernel Interfaces: bcanput(9r), canput(9r), getq(9r), putq(9r)putbq(9r)