1
0

lib9.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __LIB9_H
  2. #define __LIB9_H
  3. #if !defined(_RESEARCH_SOURCE) && !defined(_PLAN9_SOURCE)
  4. This header file is an extension to ANSI/POSIX
  5. #endif
  6. #pragma lib "/$M/lib/ape/lib9.a"
  7. #define MORDER 0x0003 /* mask for bits defining order of mounting */
  8. #define MREPL 0x0000 /* mount replaces object */
  9. #define MBEFORE 0x0001 /* mount goes before others in union directory */
  10. #define MAFTER 0x0002 /* mount goes after others in union directory */
  11. #define MCREATE 0x0004 /* permit creation in mounted directory */
  12. #define MRECOV 0x0008 /* perform recovery if mount channel is lost */
  13. #define MCACHE 0x0010 /* cache some data */
  14. #define MMASK 0x0007 /* all bits on */
  15. #define FORKPG 1
  16. #define FORKEG 2
  17. #define FORKFD 4
  18. #define SG_RONLY 0040 /* read only */
  19. #define SG_CEXEC 0100 /* detach on exec */
  20. enum
  21. {
  22. RFNAMEG = (1<<0),
  23. RFENVG = (1<<1),
  24. RFFDG = (1<<2),
  25. RFNOTEG = (1<<3),
  26. RFPROC = (1<<4),
  27. RFMEM = (1<<5),
  28. RFNOWAIT = (1<<6),
  29. RFCNAMEG = (1<<10),
  30. RFCENVG = (1<<11),
  31. RFCFDG = (1<<12),
  32. RFREND = (1<<13)
  33. };
  34. extern int errstr(char*, unsigned int);
  35. extern int bind(char*, char*, int);
  36. extern int mount(int, int, char*, int, char*);
  37. extern int unmount(char*, char*);
  38. extern int rfork(int);
  39. extern int segattach(int, char*, void*, unsigned long);
  40. extern int segbrk(void*, void*);
  41. extern int segdetach(void*);
  42. extern int segflush(void*, unsigned long);
  43. extern int segfree(void*, unsigned long);
  44. extern unsigned long rendezvous(unsigned long, unsigned long);
  45. extern unsigned long getfcr(void);
  46. extern unsigned long getfsr(void);
  47. extern void setfcr(unsigned long);
  48. extern void setfsr(unsigned long);
  49. #endif