SVR5 and SCO OpenServer 5
putbq(D3str)
putbq --
place a message at the head of a queue
Synopsis
#include <sys/stream.h>
#include <sys/ddi.h>
int putbq(queue_t *q, mblk_t *bp);
Description
putbq puts a message back at the head of a queue.
If messages of a higher priority are on the queue, then
bp is placed at the head of its corresponding priority
band.
See
srv(D2str)
for more information about message
priorities.
All flow control parameters are updated.
The queue's service routine is scheduled
if it has not been disabled by a previous call to
noenable(D3str).
Arguments
q-
Pointer to the queue.
bp-
Pointer to the message.
Return values
putbq returns 1 on success and 0 on failure.
Usage
putbq is usually called when
bcanput(D3str)
or
canput(D3str)
or, for DDI multithreaded drivers,
bcanputnext(D3str)
or
canputnext(D3str)
determines that the message cannot be passed on to the next stream component.
putbq can fail if there is not enough memory
to allocate the accounting data structures used with messages
whose priority bands are greater than zero.
High priority messages should never be put back on a queue
from within a service routine.
Context
Base or Interrupt.
Synchronization constraints
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
The caller cannot have the stream frozen
(see
freezestr(D3str))
when calling this function.
Examples
See
bufcall(D3str)
for an example of putbq.
Hardware applicability
All
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi:
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
References
bcanput(D3str),
bcanputnext(D3str),
canput(D3str),
canputnext(D3str),
getq(D3str),
insq(D3str),
msgb(D4str),
putq(D3str),
queue(D4str),
rmvq(D3str),
srv(D2str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005