Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

getq(D3DK)  —  

.IX \f4getq\fP(D3DK)

NAME

getq − get the next message from a queue

SYNOPSIS

#include <sys/stream.h>
mblk_t ∗getq(queue_t ∗q);

ARGUMENTS

qPointer to the queue from which the message is to be retrieved. 

DESCRIPTION

getq is used by service [see srv(D2DK)] routines to retrieve queued messages.  It gets the next available message from the top of the queue pointed to by q.  getq handles flow control, restarting I/O that was blocked as needed. 

RETURN VALUE

If there is a message to retrieve, getq returns a pointer to it.  If no message is queued, getq returns a NULL pointer. 

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. 

SEE ALSO

srv(D2DK), bcanput(D3DK), canput(D3DK), putbq(D3DK), putq(D3DK), qenable(D3DK), rmvq(D3DK)

EXAMPLE

See srv(D2DK) for an example of getq. 

DDI/DKI  —  STREAMS

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