Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ OTHERQ(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       OTHERQ(D3)                                                OTHERQ(D3)


       NAME
             OTHERQ - get a pointer to queue's partner queue

       SYNOPSIS
             #include <sys/stream.h>
             #include <sys/ddi.h>
             queue_t *OTHERQ(queue_t *q);

          Arguments
             q         Pointer to the queue.

       DESCRIPTION
             The OTHERQ function returns a pointer to the other of the two
             queue structures that make up an instance of a STREAMS module
             or driver.

          Return Values
             OTHERQ returns a pointer to a queue's partner.

       USAGE
          Level
             Base or Interrupt.

          Synchronization Constraints
             Does not sleep.

             Multithreaded drivers may hold driver-defined basic locks,
             read/write locks, and sleep locks across calls to this
             function.

          Examples
             This routine sets the minimum packet size, the maximum packet
             size, the high water mark, and the low water mark for the read
             and write queues of a given module or driver.  It is passed
             either one of the queues.  This could be used if a module or
             driver wished to update its queue parameters dynamically.

              1  void
              2  set_q_params(queue_t *q, long min, long max, ulong_t hi, ulong_t lo)
              3  {
              4    pl_t pl;    /* for multi-threaded drivers */
              5    pl = freezestr(q); /* for multi-threaded drivers */
              6    (void) strqset(q, QMINPSZ, 0, min);
              7    (void) strqset(q, QMAXPSZ, 0, max);
              8    (void) strqset(q, QHIWAT, 0, hi);
              9    (void) strqset(q, QLOWAT, 0, lo);


                           Copyright 1994 Novell, Inc.               Page 1













      OTHERQ(D3)                                                OTHERQ(D3)


            10    (void) strqset(OTHERQ(q), QMINPSZ, 0, min);
            11    (void) strqset(OTHERQ(q), QMAXPSZ, 0, max);
            12    (void) strqset(OTHERQ(q), QHIWAT, 0, hi);
            13    (void) strqset(OTHERQ(q), QLOWAT, 0, lo);
            14    unfreezestr(q,pl); /* for multi-threaded drivers */
            15  }

      REFERENCES
            RD(D3), WR(D3)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
































                          Copyright 1994 Novell, Inc.               Page 2








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