blob: 3f3ad49e83659a333b702f5c4afb9d1c1af1f14f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ALPHA_FCNTL_H
2#define _ALPHA_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 Torvalds1da177e2005-04-16 15:20:36 -07006#define O_CREAT 01000 /* not fcntl */
7#define O_TRUNC 02000 /* not fcntl */
8#define O_EXCL 04000 /* not fcntl */
9#define O_NOCTTY 010000 /* not fcntl */
10
11#define O_NONBLOCK 00004
12#define O_APPEND 00010
13#define O_NDELAY O_NONBLOCK
14#define O_SYNC 040000
15#define FASYNC 020000 /* fcntl, for BSD compatibility */
16#define O_DIRECTORY 0100000 /* must be a directory */
17#define O_NOFOLLOW 0200000 /* don't follow links */
18#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
19#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */
20#define O_NOATIME 04000000
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#define F_GETLK 7
23#define F_SETLK 8
24#define F_SETLKW 9
25
26#define F_SETOWN 5 /* for sockets. */
27#define F_GETOWN 6 /* for sockets. */
28#define F_SETSIG 10 /* for sockets. */
29#define F_GETSIG 11 /* for sockets. */
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031/* for posix fcntl() and lockf() */
32#define F_RDLCK 1
33#define F_WRLCK 2
34#define F_UNLCK 8
35
36/* for old implementation of bsd flock () */
37#define F_EXLCK 16 /* or 3 */
38#define F_SHLCK 32 /* or 4 */
39
40#define F_INPROGRESS 64
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042struct flock {
43 short l_type;
44 short l_whence;
45 __kernel_off_t l_start;
46 __kernel_off_t l_len;
47 __kernel_pid_t l_pid;
48};
49
Stephen Rothwell93172592005-09-06 15:17:57 -070050#include <asm-generic/fcntl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
52#endif