man Pages(9F): DDI and DKI Kernel Functions
只搜寻这本书
以 PDF 格式下载本书

NAME

backq - get pointer to the queue behind the current queue

SYNOPSIS

#include <sys/stream.h>
queue_t * backq(queue_t* cq);

ARGUMENTS

cq
The pointer to the current queue. queue_t is an alias for the queue(9S) structure.

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

DESCRIPTION

backq( ) returns a pointer to the queue preceding cq (the current queue). If cq is a read queue, backq( ) returns a pointer to the queue downstream from cq, unless it is the stream end. If cq is a write queue, backq( ) returns a pointer to the next queue upstream from cq, unless it is the stream head.

RETURN VALUES

If successful, backq( ) returns a pointer to the queue preceding the current queue. Otherwise, it returns NULL.

CONTEXT

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

SEE ALSO

Writing Device Drivers
STREAMS Programmer's Guide