|
|
1.1 root 1: /* file.h 4.5 81/03/09 */
2:
3: /*
4: * One file structure is allocated
5: * for each open/creat/pipe call.
6: * Main use is to hold the read/write
7: * pointer associated with each open
8: * file.
9: */
10: struct file
11: {
12: short f_flag;
13: short f_count; /* reference count */
14: struct inode *f_inode; /* pointer to inode structure */
15: union {
16: off_t f_offset; /* read/write character pointer */
17: struct chan *f_chan; /* mpx channel pointer */
18: } f_un;
19: };
20:
21: #ifdef KERNEL
22: struct file *file, *fileNFILE; /* the file table itself */
23: int nfile;
24:
25: struct file *getf();
26: struct file *falloc();
27: #endif
28:
29: /* flags */
30: #define FREAD 01
31: #define FWRITE 02
32: #define FPIPE 04
33: #define FMPX 010
34: #define FMPY 020
35: #define FMP 030
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.