|
|
1.1 root 1: /*
2: * One file structure is allocated
3: * for each open/creat/pipe call.
4: * Main use is to hold the read/write
5: * pointer associated with each open
6: * file.
7: */
8: struct file
9: {
10: short f_flag;
11: short f_count; /* reference count */
12: struct inode *f_inode; /* pointer to inode structure */
13: off_t f_offset; /* read/write character pointer */
14: #ifdef CHAOS
15: caddr_t f_conn; /* Chaosnet connection pointer */
16: #endif CHAOS
17: };
18:
19: #ifdef KERNEL
20: struct file *file, *fileNFILE; /* the file table itself */
21: int nfile;
22:
23: struct file *getf();
24: struct file *falloc();
25: struct file *allocfile();
26: #endif
27:
28: /* flags */
29: #define FREAD 01
30: #define FWRITE 02
31: #define FPIPE 04
32: #define FHUNGUP 010
33: #define FALOCK 020 /* this file is advisory-locked */
34: #define FRNBLK 040 /* no block on read */
35: #define FWNBLK 0100 /* no block on write */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.