home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / fs / fifonode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.9 KB  |  57 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _FS_FIFONODE_H
  11. #define _FS_FIFONODE_H
  12.  
  13. #ident    "@(#)/usr/include/sys/fs/fifonode.h.sl 1.1 4.0 12/08/90 28185 AT&T-USL"
  14.  
  15. /*
  16.  * Each FIFOFS object is identified by a struct fifonode/vnode pair.
  17.  */
  18. struct fifonode {
  19.     struct vnode    fn_vnode;    /* represents the fifo/pipe */
  20.     struct vnode    *fn_mate;    /* the other end of a pipe */
  21.     struct vnode    *fn_realvp;    /* node being shadowed by fifo */
  22.     ushort        fn_ino;        /* node id for pipes */
  23.     short        fn_wcnt;    /* number of writers */
  24.     short        fn_rcnt;    /* number of readers */
  25.     short        fn_open;    /* open count of node*/
  26.     struct vnode    *fn_unique;    /* new vnode created by CONNLD */
  27.     ushort        fn_flag;    /* flags as defined below */
  28.     time_t        fn_atime;    /* creation times for pipe */
  29.     time_t        fn_mtime;
  30.     time_t        fn_ctime;
  31.     struct fifonode    *fn_nextp;    /* next link in the linked list */
  32.     struct fifonode    *fn_backp;    /* back link in linked list */
  33. };
  34.  
  35. /*
  36.  * Valid flags for fifonodes.
  37.  */
  38. #define ISPIPE        01    /* fifonode is that of a pipe */
  39. #define FIFOLOCK    02    /* fifonode is locked */
  40. #define FIFOSEND        04    /* file descriptor at stream head of pipe */
  41. #define FIFOWRITE      010    /* process is blocked waiting to write */
  42. #define FIFOWANT       020    /* a process wants to access the fifonode */
  43. #define FIFOREAD       040    /* process is blocked waiting to read */
  44. #define FIFOPASS      0100    /* CONNLD passed a new vnode in fn_unique */
  45.  
  46. /* XENIX Support */
  47. extern int fifo_rdchk();
  48. /* End XENIX Support */
  49.  
  50. /*
  51.  * Macros to convert a vnode to a fifnode, and vice versa.
  52.  */
  53. #define VTOF(vp) ((struct fifonode *)((vp)->v_data))
  54. #define FTOV(fp) (&(fp)->fn_vnode)
  55.  
  56. #endif    /* _FS_FIFONODE_H */
  57.