Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/file.h
Show First 20 Lines • Show All 278 Lines • ▼ Show 20 Lines | |||||
static __inline int | static __inline int | ||||
_fnoop(void) | _fnoop(void) | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | } | ||||
#define fhold(fp) \ | static __inline __result_use_check bool | ||||
(refcount_acquire(&(fp)->f_count)) | fhold(struct file *fp) | ||||
{ | |||||
return (refcount_acquire_checked(&fp->f_count)); | |||||
} | |||||
#define fdrop(fp, td) \ | #define fdrop(fp, td) \ | ||||
(refcount_release(&(fp)->f_count) ? _fdrop((fp), (td)) : _fnoop()) | (refcount_release(&(fp)->f_count) ? _fdrop((fp), (td)) : _fnoop()) | ||||
static __inline fo_rdwr_t fo_read; | static __inline fo_rdwr_t fo_read; | ||||
static __inline fo_rdwr_t fo_write; | static __inline fo_rdwr_t fo_write; | ||||
static __inline fo_truncate_t fo_truncate; | static __inline fo_truncate_t fo_truncate; | ||||
static __inline fo_ioctl_t fo_ioctl; | static __inline fo_ioctl_t fo_ioctl; | ||||
static __inline fo_poll_t fo_poll; | static __inline fo_poll_t fo_poll; | ||||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |