Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ putbq(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

putbq(D3DK)  —  

.IX \f4putbq\fP(D3DK)

NAME

putbq − place a message at the head of a queue

SYNOPSIS

#include <sys/stream.h>
int putbq(queue_t ∗q, mblk_t ∗bp);

ARGUMENTS

qPointer to the queue. 

bpPointer to the message. 

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(D2DK) 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(D3DK). 

putbq is usually called when bcanputnext(D3DK) or canputnext(D3DK) determines that the message cannot be passed on to the next stream component. 

RETURN VALUE

putbq returns 1 on success and 0 on failure. 

LEVEL

Base or Interrupt. 

NOTES

Does not sleep. 

Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function. 

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. 

SEE ALSO

srv(D2DK), bcanputnext(D3DK), canputnext(D3DK), getq(D3DK), insq(D3DK), putq(D3DK), rmvq(D3DK), msgb(D4DK), queue(D4DK)

EXAMPLE

See bufcall(D3DK) for an example of putbq. 

DDI/DKI  —  STREAMS

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026