MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                           OTHERQ(9F)



NAME
     OTHERQ, otherq - get pointer to queue's partner queue

SYNOPSIS
     #include 
     #include 



     queuet *OTHERQ(queuet *q);


INTERFACE LEVEL
     Architecture independent level 1 (DI/DKI).

PARAMETERS
     q    Pointer to the queue.


DESCRIPTION
     The OTHERQ() function returns a pointer to the other of  the
     two  queue  structures  that  make  up  a  STREAMS module or
     driver. If q points to the read queue the write  queue  will
     be returned, and vice versa.

RETURN VALUES
     The  OTHERQ()  function  returns  a  pointer  to  a  queue's
     partner.

CONTEXT
     The OTHERQ() function can be called from user, interrupt, or
     kernel context.

EXAMPLES
     Example 1 Setting Queues


     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  setqparams(q, min, max, hi, lo)
        3      queuet *q;
        4      short min;
        5      short max;
        6      ushortt hi;
        7      ushortt lo;



SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                           OTHERQ(9F)



        8  {
        9           q->qminpsz = min;
       10           q->qmaxpsz = max;
       11           q->qhiwat = hi;
       12             q->qlowat = lo;
       13           OTHERQ(q)->qminpsz = min;
       14           OTHERQ(q)->qmaxpsz = max;
       15           OTHERQ(q)->qhiwat = hi;
       16           OTHERQ(q)->qlowat = lo;
       17  }


SEE ALSO
     Writing Device Drivers


     STREAMS Programming Guide






































SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™