Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _X86_64_FCNTL_H |
| 2 | #define _X86_64_FCNTL_H |
| 3 | |
| 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
| 5 | located on an ext2 file system */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | #define O_CREAT 0100 /* not fcntl */ |
| 7 | #define O_EXCL 0200 /* not fcntl */ |
| 8 | #define O_NOCTTY 0400 /* not fcntl */ |
| 9 | #define O_TRUNC 01000 /* not fcntl */ |
| 10 | #define O_APPEND 02000 |
| 11 | #define O_NONBLOCK 04000 |
| 12 | #define O_NDELAY O_NONBLOCK |
| 13 | #define O_SYNC 010000 |
| 14 | #define FASYNC 020000 /* fcntl, for BSD compatibility */ |
| 15 | #define O_DIRECT 040000 /* direct disk access hint */ |
| 16 | #define O_LARGEFILE 0100000 |
| 17 | #define O_DIRECTORY 0200000 /* must be a directory */ |
| 18 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
| 19 | #define O_NOATIME 01000000 |
| 20 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #define F_GETLK 5 |
| 22 | #define F_SETLK 6 |
| 23 | #define F_SETLKW 7 |
| 24 | |
| 25 | #define F_SETOWN 8 /* for sockets. */ |
| 26 | #define F_GETOWN 9 /* for sockets. */ |
| 27 | #define F_SETSIG 10 /* for sockets. */ |
| 28 | #define F_GETSIG 11 /* for sockets. */ |
| 29 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | /* for posix fcntl() and lockf() */ |
| 31 | #define F_RDLCK 0 |
| 32 | #define F_WRLCK 1 |
| 33 | #define F_UNLCK 2 |
| 34 | |
| 35 | /* for old implementation of bsd flock () */ |
| 36 | #define F_EXLCK 4 /* or 3 */ |
| 37 | #define F_SHLCK 8 /* or 4 */ |
| 38 | |
| 39 | /* for leases */ |
| 40 | #define F_INPROGRESS 16 |
| 41 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | struct flock { |
| 43 | short l_type; |
| 44 | short l_whence; |
| 45 | off_t l_start; |
| 46 | off_t l_len; |
| 47 | pid_t l_pid; |
| 48 | }; |
| 49 | |
Stephen Rothwell | 9317259 | 2005-09-06 15:17:57 -0700 | [diff] [blame^] | 50 | #include <asm-generic/fcntl.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | |
| 52 | #endif /* !_X86_64_FCNTL_H */ |