Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/file.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
struct file; | struct file; | ||||
struct filecaps; | struct filecaps; | ||||
struct kaiocb; | struct kaiocb; | ||||
struct kinfo_file; | struct kinfo_file; | ||||
struct ucred; | struct ucred; | ||||
#define FOF_OFFSET 0x01 /* Use the offset in uio argument */ | #define FOF_OFFSET 0x01 /* Use the offset in uio argument */ | ||||
#define FOF_NOLOCK 0x02 /* Do not take FOFFSET_LOCK */ | #define FOF_NOLOCK 0x02 /* Do not take FOFFSET_LOCK */ | ||||
#define FOF_NEXTOFF 0x04 /* Also update f_nextoff */ | #define FOF_NEXTOFF_R 0x04 /* Also update f_nextoff[UIO_READ] */ | ||||
#define FOF_NEXTOFF_W 0x08 /* Also update f_nextoff[UIO_WRITE] */ | |||||
#define FOF_NOUPDATE 0x10 /* Do not update f_offset */ | #define FOF_NOUPDATE 0x10 /* Do not update f_offset */ | ||||
off_t foffset_lock(struct file *fp, int flags); | off_t foffset_lock(struct file *fp, int flags); | ||||
void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); | void foffset_lock_uio(struct file *fp, struct uio *uio, int flags); | ||||
void foffset_unlock(struct file *fp, off_t val, int flags); | void foffset_unlock(struct file *fp, off_t val, int flags); | ||||
void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); | void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags); | ||||
static inline off_t | static inline off_t | ||||
foffset_get(struct file *fp) | foffset_get(struct file *fp) | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | struct file { | ||||
short f_type; /* descriptor type */ | short f_type; /* descriptor type */ | ||||
short f_vnread_flags; /* (f) Sleep lock for f_offset */ | short f_vnread_flags; /* (f) Sleep lock for f_offset */ | ||||
volatile u_int f_flag; /* see fcntl.h */ | volatile u_int f_flag; /* see fcntl.h */ | ||||
volatile u_int f_count; /* reference count */ | volatile u_int f_count; /* reference count */ | ||||
/* | /* | ||||
* DTYPE_VNODE specific fields. | * DTYPE_VNODE specific fields. | ||||
*/ | */ | ||||
union { | union { | ||||
int16_t f_seqcount; /* (a) Count of sequential accesses. */ | int16_t f_seqcount[2]; /* (a) Count of seq. reads and writes. */ | ||||
int f_pipegen; | int f_pipegen; | ||||
}; | }; | ||||
off_t f_nextoff; /* next expected read/write offset. */ | off_t f_nextoff[2]; /* next expected read/write offset. */ | ||||
union { | union { | ||||
struct cdev_privdata *fvn_cdevpriv; | struct cdev_privdata *fvn_cdevpriv; | ||||
/* (d) Private data for the cdev. */ | /* (d) Private data for the cdev. */ | ||||
struct fadvise_info *fvn_advice; | struct fadvise_info *fvn_advice; | ||||
} f_vnun; | } f_vnun; | ||||
/* | /* | ||||
* DFLAG_SEEKABLE specific fields | * DFLAG_SEEKABLE specific fields | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |