OTHERQ(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

OTHERQ(9f)

OTHERQ(9F)                     Kernel Functions                     OTHERQ(9F)



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

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

       queue_t *OTHERQ(queue_t *q);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/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  set_q_params(q, min, max, hi, lo)
          3      queue_t *q;
          4      short min;
          5      short max;
          6      ushort_t hi;
          7      ushort_t lo;
          8  {
          9           q->q_minpsz = min;
         10           q->q_maxpsz = max;
         11           q->q_hiwat = hi;
         12             q->q_lowat = lo;
         13           OTHERQ(q)->q_minpsz = min;
         14           OTHERQ(q)->q_maxpsz = max;
         15           OTHERQ(q)->q_hiwat = hi;
         16           OTHERQ(q)->q_lowat = lo;
         17  }



SEE ALSO
       Writing Device Drivers in Oracle Solaris 11.4


       STREAMS Programming Guide



Oracle Solaris 11.4               16 Jan 2006                       OTHERQ(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3