DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

queue(D4str)


queue -- STREAMS queue structure

Synopsis

   #include <sys/types.h>
   #include <sys/stream.h>
   #include <sys/ddi.h>

Description

A instance of a STREAMS driver or module consists of two queue structures, one for upstream (read-side) processing and one for downstream (write-side) processing.

Usage

This structure is the major building block of a stream. It contains pointers to the processing procedures, pointers to the next queue in the stream, flow control parameters, and a list of messages to be processed.

Structure definitions

The queue structure is defined as type queue_t and contains the following members:
   struct qinit	*q_qinfo;
   struct msgb	*q_first;
   struct msgb	*q_last;
   struct queue	*q_next;
   void	*q_ptr;
   ulong_t	q_count;
   ulong_t	q_flag;
   long	q_minpsz;
   long	q_maxpsz;
   ulong_t	q_hiwat;
   ulong_t	q_lowat;

Structure members


q_qinfo
contains a pointer to the qinit(D4str) structure specifying the processing routines and default values for the queue. Drivers and modules muust not modify this member.

q_first
points to the first message on the queue, or is NULL if the queue is empty. Drivers and modules should not modify this member.

q_last
points to the last message on the queue, or is NULL if the queue is empty. Drivers and modules should not modify this member.

q_next
points to the next queue in the stream. Drivers and modules should not modify this member.

q_ptr
private member for use by drivers and modules. It provides a way to associate the driver's per-minor data structure with the queue.

q_count
contains the number of bytes in messages on the queue in priority band 0. This includes normal messages and high priority messages.

q_flag
contains a bitmask of flags that indicate different queue characteristics. No flags may be set or cleared by drivers or modules. However, the following flags may be tested:

QREADR
The queue is the read queue. Absence of this flag implies a write queue.

q_minpsz
minimum packet size for the queue. This is an advisory limit specifying the smallest message that can be accepted by the queue. It is initially set to the value specified by the mi_minpsz member of the module_info(D4str) structure. This member can be modified by drivers or modules.

q_maxpsz
maximum packet size for the queue. This is an advisory limit specifying the largest message that can be accepted by the queue. It is initially set to the value specified by the mi_maxpsz member of the module_info(D4str) structure. This member can be modified by drivers or modules.

q_hiwat
high water mark for the queue. This specifies the number of bytes of data contained in messages on the queue such that the queue is considered full, and hence flow-controlled. It is initially set to the value specified by the mi_hiwat member of the module_info(D4str) structure. This member can be modified by drivers or modules.

q_lowat
low water mark for the queue. This specifies the number of bytes of data contained in messages on the queue such that the queue is no longer flow-controlled. It is initially set to the value specified by the mi_lowat member of the module_info(D4str) structure. This member can be modified by drivers or modules.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

References

getq(D3str), module_info(D4str), msgb(D4str), putq(D3str), qinit(D4str), strqget(D3str), strqset(D3str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005