Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/file.h
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
#define FDEVFS_VNODE 0x4 | #define FDEVFS_VNODE 0x4 | ||||
#endif /* _KERNEL || _WANT_FILE */ | #endif /* _KERNEL || _WANT_FILE */ | ||||
/* | /* | ||||
* Userland version of struct file, for sysctl | * Userland version of struct file, for sysctl | ||||
*/ | */ | ||||
struct xfile { | struct xfile { | ||||
size_t xf_size; /* size of struct xfile */ | uint64_t xf_size; /* size of struct xfile */ | ||||
pid_t xf_pid; /* owning process */ | pid_t xf_pid; /* owning process */ | ||||
uid_t xf_uid; /* effective uid of owning process */ | uid_t xf_uid; /* effective uid of owning process */ | ||||
int xf_fd; /* descriptor number */ | int xf_fd; /* descriptor number */ | ||||
void *xf_file; /* address of struct file */ | int _xf_int_pad1; | ||||
int64_t xf_file; /* address of struct file */ | |||||
short xf_type; /* descriptor type */ | short xf_type; /* descriptor type */ | ||||
short _xf_short_pad1; | |||||
int xf_count; /* reference count */ | int xf_count; /* reference count */ | ||||
int xf_msgcount; /* references from message queue */ | int xf_msgcount; /* references from message queue */ | ||||
int _xf_int_pad2; | |||||
off_t xf_offset; /* file offset */ | off_t xf_offset; /* file offset */ | ||||
void *xf_data; /* file descriptor specific data */ | int64_t xf_data; /* file descriptor specific data */ | ||||
void *xf_vnode; /* vnode pointer */ | int64_t xf_vnode; /* vnode pointer */ | ||||
u_int xf_flag; /* flags (see fcntl.h) */ | u_int xf_flag; /* flags (see fcntl.h) */ | ||||
int _xf_int_pad3; | |||||
int64_t _xf_int64_pad[4]; | |||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
extern struct fileops vnops; | extern struct fileops vnops; | ||||
extern struct fileops badfileops; | extern struct fileops badfileops; | ||||
extern struct fileops socketops; | extern struct fileops socketops; | ||||
extern int maxfiles; /* kernel limit on number of open files */ | extern int maxfiles; /* kernel limit on number of open files */ | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |