file.h revision 794f0adb050e571bbfde4d2a19b9f88b852079dd
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * f_rwlock protects f_vnode and f_cred 2N/A * f_tlock protects the rest 2N/A * The purpose of locking in this layer is to keep the kernel 2N/A * from panicing if, for example, a thread calls close() while 2N/A * another thread is doing a read(). It is up to higher levels 2N/A * to make sure 2 threads doing I/O to the same file don't 2N/A * screw each other up. 2N/A * Main use is to hold the read/write pointer associated with 2N/A * fpollinfo struct - used by poll caching to track who has polled the fd #
define FSYNC 0x10 /* file (data+inode) integrity while writing */#
define FREVOKED 0x20 /* Object reuse Revoked file */#
define FDSYNC 0x40 /* file data only integrity while writing */#
define FMASK 0xa0ff /* all flags that can be changed by F_SETFL */#
define FASYNC 0x1000 /* asyncio in progress pseudo flag */#
define FOFFMAX 0x2000 /* large file */#
define FXATTR 0x4000 /* open as extended attribute */#
define FRSYNC 0x8000 /* sync read operations at same level of */ /* integrity as specified for writes by */ /* FSYNC and FDSYNC flags */ #
define FNODSYNC 0x10000 /* fsync pseudo flag */#
define FNOFOLLOW 0x20000 /* don't follow symlinks */#
define FNOLINKS 0x40000 /* don't allow multiple hard links */#
define FIGNORECASE 0x80000 /* request case-insensitive lookups */#
define FXATTRDIROPEN 0x100000 /* only opening hidden attribute directory *//* f_flag2 (open-only) */ #
define FSEARCH 0x200000 /* O_SEARCH = 0x200000 */#
define FEXEC 0x400000 /* O_EXEC = 0x400000 */ * Fake flags for driver ioctl calls to inform them of the originating * Part of the Solaris 2.6+ DDI/DKI * Large Files: The macro gets the offset maximum (refer to LFS API doc) * corresponding to a file descriptor. We had the choice of storing * this value in file descriptor. Right now we only have two * offset maximums one if MAXOFF_T and other is MAXOFFSET_T. It is * inefficient to store these two values in a separate member in * file descriptor. To avoid wasting spaces we define this macro. * The day there are more than two offset maximum we may want to * Fake flag => internal ioctl call for layered drivers. * Note that this flag deliberately *won't* fit into * the f_flag field of a file_t. * Part of the Solaris 2.x DDI/DKI. #
define FKIOCTL 0x80000000 /* ioctl addresses are from kernel */ * Fake flag => this time to specify that the open(9E) * comes from another part of the kernel, not userland. * Part of the Solaris 2.x DDI/DKI. #
define FKLYR 0x40000000 /* layered driver call *//* miscellaneous defines */ #
define L_SET 0
/* for lseek */ * Routines dealing with user per-open file flags and struct proc;
/* forward reference for function prototype */ extern int f_badfd(
int,
int *,
int);
/* The following functions are only used in ASSERT()s */ #
endif /* defined(_KERNEL) */