Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ queue(D4) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       queue(D4)                                                  queue(D4)


       NAME
             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;  /* module or driver entry points */
             struct msgb   *q_first;  /* first message in queue */
             struct msgb   *q_last;   /* last message in queue */
             struct queue  *q_next;   /* next queue in stream */
             void          *q_ptr;    /* pointer to private data structure */
             ulong_t       q_count;   /* approximate size of message queue */
             ulong_t       q_flag;    /* status of queue */
             long          q_minpsz;  /* smallest packet accepted by QUEUE */
             long          q_maxpsz;  /* largest packet accepted by QUEUE */
             ulong_t       q_hiwat;   /* high water mark */
             ulong_t       q_lowat;   /* low water mark */
             The q_qinfo field contains a pointer to the qinit(D4)
             structure specifying the processing routines and default
             values for the queue.  This field should not be changed by
             drivers or modules.

             The q_first field points to the first message on the queue, or
             is NULL if the queue is empty.  This field should not be
             changed by drivers or modules.

             The q_last field points to the last message on the queue, or
             is NULL if the queue is empty.  This field should not be
             changed by drivers or modules.


                           Copyright 1994 Novell, Inc.               Page 1













      queue(D4)                                                  queue(D4)


            The q_next field points to the next queue in the stream.  This
            field should not be changed by drivers or modules.

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

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

            The q_flag field 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.

            The q_minpsz field is the 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 field in the module_info(D4)
            structure.  This field can be changed by drivers or modules.

            The q_maxpsz field is the 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 field in the module_info
            structure.  This field can be changed by drivers or modules.

            The q_hiwat field is the 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 field in the module_info structure.  This
            field can be changed by drivers or modules.

            The q_lowat field is the 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
            field in the module_info structure.  This field can be changed
            by drivers or modules.




                          Copyright 1994 Novell, Inc.               Page 2













       queue(D4)                                                  queue(D4)


       REFERENCES
             getq(D3), module_info(D4), msgb(D4), putq(D3), qinit(D4),
             strqget(D3), strqset(D3)

       NOTICES
          Portability
             All processors









































                           Copyright 1994 Novell, Inc.               Page 3








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