summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/sys/file.h')
-rw-r--r--freebsd/sys/sys/file.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/freebsd/sys/sys/file.h b/freebsd/sys/sys/file.h
index 60339b81..f563f75c 100644
--- a/freebsd/sys/sys/file.h
+++ b/freebsd/sys/sys/file.h
@@ -117,6 +117,14 @@ struct fileops {
* none not locked
*/
+struct fadvise_info {
+ int fa_advice; /* (f) FADV_* type. */
+ off_t fa_start; /* (f) Region start. */
+ off_t fa_end; /* (f) Region end. */
+ off_t fa_prevstart; /* (f) Previous NOREUSE start. */
+ off_t fa_prevend; /* (f) Previous NOREUSE end. */
+};
+
struct file {
#ifndef __rtems__
void *f_data; /* file descriptor specific data */
@@ -132,7 +140,11 @@ struct file {
*/
int f_seqcount; /* Count of sequential accesses. */
off_t f_nextoff; /* next expected read/write offset. */
- struct cdev_privdata *f_cdevpriv; /* (d) Private data for the cdev. */
+ union {
+ struct cdev_privdata *fvn_cdevpriv;
+ /* (d) Private data for the cdev. */
+ struct fadvise_info *fvn_advice;
+ } f_vnun;
/*
* DFLAG_SEEKABLE specific fields
*/
@@ -223,6 +235,9 @@ rtems_bsd_error_to_status_and_errno(int error)
}
#endif /* __rtems__ */
+#define f_cdevpriv f_vnun.fvn_cdevpriv
+#define f_advice f_vnun.fvn_advice
+
#define FOFFSET_LOCKED 0x1
#define FOFFSET_LOCK_WAITING 0x2