Commit | Line | Data |
---|---|---|
9317259e SR |
1 | #ifndef _ASM_GENERIC_FCNTL_H |
2 | #define _ASM_GENERIC_FCNTL_H | |
3 | ||
4 | #define O_ACCMODE 0003 | |
5 | #define O_RDONLY 0000 | |
6 | #define O_WRONLY 0001 | |
7 | #define O_RDWR 0002 | |
8 | ||
9 | #define F_DUPFD 0 /* dup */ | |
10 | #define F_GETFD 1 /* get close_on_exec */ | |
11 | #define F_SETFD 2 /* set/clear close_on_exec */ | |
12 | #define F_GETFL 3 /* get file->f_flags */ | |
13 | #define F_SETFL 4 /* set file->f_flags */ | |
14 | ||
15 | /* for F_[GET|SET]FL */ | |
16 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | |
17 | ||
18 | /* operations for bsd flock(), also used by the kernel implementation */ | |
19 | #define LOCK_SH 1 /* shared lock */ | |
20 | #define LOCK_EX 2 /* exclusive lock */ | |
21 | #define LOCK_NB 4 /* or'd with one of the above to prevent | |
22 | blocking */ | |
23 | #define LOCK_UN 8 /* remove lock */ | |
24 | ||
25 | #define LOCK_MAND 32 /* This is a mandatory flock ... */ | |
26 | #define LOCK_READ 64 /* which allows concurrent read operations */ | |
27 | #define LOCK_WRITE 128 /* which allows concurrent write operations */ | |
28 | #define LOCK_RW 192 /* which allows concurrent read & write ops */ | |
29 | ||
30 | #define F_LINUX_SPECIFIC_BASE 1024 | |
31 | ||
32 | #endif /* _ASM_GENERIC_FCNTL_H */ |