diff options
Diffstat (limited to 'freebsd/sys/sys/file.h')
-rw-r--r-- | freebsd/sys/sys/file.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/freebsd/sys/sys/file.h b/freebsd/sys/sys/file.h index 22e6c8d0..0e7c296a 100644 --- a/freebsd/sys/sys/file.h +++ b/freebsd/sys/sys/file.h @@ -410,8 +410,14 @@ _fnoop(void) return (0); } -#define fhold(fp) \ - (refcount_acquire(&(fp)->f_count)) +#ifndef __rtems__ +static __inline __result_use_check bool +fhold(struct file *fp) +{ + return (refcount_acquire_checked(&fp->f_count)); +} +#endif /* __rtems__ */ + #ifndef __rtems__ #define fdrop(fp, td) \ (refcount_release(&(fp)->f_count) ? _fdrop((fp), (td)) : _fnoop()) |