home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3297 / structfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-07  |  1.2 KB  |  46 lines

  1. #ifndef STRUCT_FILE_H
  2. #define STRUCT_FILE_H
  3.  
  4. /* On any supported system, you can #include "structfile.h" any number */
  5. /* of times safely to get a complete definition of struct file. */
  6.  
  7. /* On an optimal system, this file would contain solely: */
  8. /* #include <sys/file.h> */
  9.  
  10. #include "confconvexsysfile.h"
  11. #include "confetcconfhfileh.h"
  12. #include <sys/types.h>
  13. #include <sys/param.h> /* ultrix lock_t dorks */
  14. #define KERNEL
  15. #ifdef ETCCONFHFILEH
  16. #include "/etc/conf/h/file.h"
  17. #else
  18. #ifdef CONVEXSYSFILE
  19. #include <sys/ucred.h> /* fer cryin' out loud... */
  20. #ifndef FHLOCAL
  21. #include <sys/dmonfh.h> /* idiots */
  22. #endif
  23. #endif
  24. #include <sys/file.h>
  25. #endif
  26. #undef KERNEL
  27. #include "confodofe.h"
  28. #ifdef ODOFE
  29. /* XXX
  30.  * This is from sys/user.h.  It's ifdef KERNEL, though, and defining
  31.  * KERNEL for user.h breaks other things. 
  32.  * Open-file table extension object structure.
  33.  */
  34. struct    ofile_ext {
  35.     struct    ofile_ext *oe_next;        /* list of unused entries */
  36.     short        oe_nofile;        /* # ofile entries */
  37.     short        oe_refcnt;        /* # proc's sharing this ext */
  38.     short        oe_ccount;        /* # sharing proc's in memory */
  39.     swblk_t        oe_swaddr;        /* disk address when swapped */
  40.     sema_t        oe_mutex;        /* misc mutex */
  41.     struct    ofile    *oe_ofile;        /* array of open files */
  42. };
  43. #endif
  44.  
  45. #endif
  46.