diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/fcntl.h | 3 | ||||
-rw-r--r-- | sys/sys/file.h | 22 |
2 files changed, 15 insertions, 10 deletions
diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 83e09ef..3510816 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -107,9 +107,6 @@ typedef __pid_t pid_t; #define O_TRUNC 0x0400 /* truncate to zero length */ #define O_EXCL 0x0800 /* error if already exists */ #ifdef _KERNEL -/* FMARK/FDEFER kept in f_gcflags */ -#define FMARK 0x1 /* mark during gc() */ -#define FDEFER 0x2 /* defer for next gc pass */ #define FHASLOCK 0x4000 /* descriptor holds advisory lock */ #endif diff --git a/sys/sys/file.h b/sys/sys/file.h index 17bdc81..71170bd 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -109,12 +109,24 @@ struct fileops { struct file { LIST_ENTRY(file) f_list;/* (fl) list of active files */ - short f_gcflag; /* used by thread doing fd garbage collection */ short f_type; /* descriptor type */ + void *f_data; /* file descriptor specific data */ + u_int f_flag; /* see fcntl.h */ + struct mtx *f_mtxp; /* mutex to protect data */ + struct fileops *f_ops; /* File operations */ + struct ucred *f_cred; /* credentials associated with descriptor */ int f_count; /* (f) reference count */ + + /* DFLAG_SEEKABLE specific fields */ + off_t f_offset; + + /* DTYPE_SOCKET specific fields */ + short f_gcflag; /* used by thread doing fd garbage collection */ +#define FMARK 0x1 /* mark during gc() */ +#define FDEFER 0x2 /* defer for next gc pass */ int f_msgcount; /* (f) references from message queue */ - struct ucred *f_cred; /* credentials associated with descriptor */ - struct fileops *f_ops; /* File operations */ + + /* DTYPE_VNODE specific fields */ int f_seqcount; /* * count of sequential accesses -- cleared * by most seek operations. @@ -122,10 +134,6 @@ struct file { off_t f_nextoff; /* * offset of next expected read or write */ - off_t f_offset; - void *f_data; /* file descriptor specific data */ - u_int f_flag; /* see fcntl.h */ - struct mtx *f_mtxp; /* mutex to protect data */ }; #endif /* _KERNEL */ |