home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / que.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.2 KB  |  62 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:que.h    1.3"
  10.  
  11. /*********************************************************************
  12.  
  13.     following structures declares the data structures used for
  14.     queue manipulation.
  15.  
  16. *********************************************************************/
  17.  
  18. /*****
  19.  
  20.     Queues consist simply of one-way list.  Each queue is
  21.     defined by a 'queue control element' made up of head
  22.     and tail pointers.  Each item held on a queue contains
  23.     a pointer word used to link successive item together.
  24.     The head pointer contains the address of the first
  25.     item in the queue and the tail pointer contains the
  26.     address of the last item.
  27.  
  28. *****/
  29.  
  30.  
  31.  
  32. /*
  33.  *    Queue Item
  34.  */
  35.  
  36. #define    QITEM    struct qitem_st
  37.  
  38. struct    qitem_st
  39.     {
  40.     QITEM    *qi_next;    /* next queue item pointer */
  41.     char    data[1];    /* data */
  42.     };
  43.  
  44.  
  45.  
  46. /*
  47.  *    Queue Control Element
  48.  */
  49.  
  50. #define    QCTRL    struct qctrl_st
  51.  
  52. struct    qctrl_st
  53.     {
  54.     QITEM    *qc_head;        /* head pointer */
  55.     QITEM    *qc_tail;        /* tail pointer */
  56.     };
  57.  
  58.  
  59.  
  60.  
  61.  
  62.