aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/fcntl.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-02-17 12:27:37 -0500
committerThomas Gleixner <tglx@linutronix.de>2010-02-17 12:28:05 -0500
commitb7e56edba4b02f2079042c326a8cd72a44635817 (patch)
treeb5042002e9747cd8fb1278d61f86d8b92a74c018 /include/asm-generic/fcntl.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parentb0483e78e5c4c9871fc5541875b3bc006846d46b (diff)
Merge branch 'linus' into x86/mm
x86/mm is on 32-rc4 and missing the spinlock namespace changes which are needed for further commits into this topic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-generic/fcntl.h')
-rw-r--r--include/asm-generic/fcntl.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index 0c3dd8603927..fcd268ce0674 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -3,8 +3,6 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
7 located on an ext2 file system */
8#define O_ACCMODE 00000003 6#define O_ACCMODE 00000003
9#define O_RDONLY 00000000 7#define O_RDONLY 00000000
10#define O_WRONLY 00000001 8#define O_WRONLY 00000001
@@ -27,8 +25,8 @@
27#ifndef O_NONBLOCK 25#ifndef O_NONBLOCK
28#define O_NONBLOCK 00004000 26#define O_NONBLOCK 00004000
29#endif 27#endif
30#ifndef O_SYNC 28#ifndef O_DSYNC
31#define O_SYNC 00010000 29#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
32#endif 30#endif
33#ifndef FASYNC 31#ifndef FASYNC
34#define FASYNC 00020000 /* fcntl, for BSD compatibility */ 32#define FASYNC 00020000 /* fcntl, for BSD compatibility */
@@ -51,6 +49,25 @@
51#ifndef O_CLOEXEC 49#ifndef O_CLOEXEC
52#define O_CLOEXEC 02000000 /* set close_on_exec */ 50#define O_CLOEXEC 02000000 /* set close_on_exec */
53#endif 51#endif
52
53/*
54 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
55 * the O_SYNC flag. We continue to use the existing numerical value
56 * for O_DSYNC semantics now, but using the correct symbolic name for it.
57 * This new value is used to request true Posix O_SYNC semantics. It is
58 * defined in this strange way to make sure applications compiled against
59 * new headers get at least O_DSYNC semantics on older kernels.
60 *
61 * This has the nice side-effect that we can simply test for O_DSYNC
62 * wherever we do not care if O_DSYNC or O_SYNC is used.
63 *
64 * Note: __O_SYNC must never be used directly.
65 */
66#ifndef O_SYNC
67#define __O_SYNC 04000000
68#define O_SYNC (__O_SYNC|O_DSYNC)
69#endif
70
54#ifndef O_NDELAY 71#ifndef O_NDELAY
55#define O_NDELAY O_NONBLOCK 72#define O_NDELAY O_NONBLOCK
56#endif 73#endif
@@ -73,14 +90,23 @@
73#define F_SETSIG 10 /* for sockets. */ 90#define F_SETSIG 10 /* for sockets. */
74#define F_GETSIG 11 /* for sockets. */ 91#define F_GETSIG 11 /* for sockets. */
75#endif 92#endif
93
94#ifndef CONFIG_64BIT
95#ifndef F_GETLK64
96#define F_GETLK64 12 /* using 'struct flock64' */
97#define F_SETLK64 13
98#define F_SETLKW64 14
99#endif
100#endif
101
76#ifndef F_SETOWN_EX 102#ifndef F_SETOWN_EX
77#define F_SETOWN_EX 12 103#define F_SETOWN_EX 15
78#define F_GETOWN_EX 13 104#define F_GETOWN_EX 16
79#endif 105#endif
80 106
81#define F_OWNER_TID 0 107#define F_OWNER_TID 0
82#define F_OWNER_PID 1 108#define F_OWNER_PID 1
83#define F_OWNER_GID 2 109#define F_OWNER_PGRP 2
84 110
85struct f_owner_ex { 111struct f_owner_ex {
86 int type; 112 int type;
@@ -139,12 +165,6 @@ struct flock {
139 165
140#ifndef CONFIG_64BIT 166#ifndef CONFIG_64BIT
141 167
142#ifndef F_GETLK64
143#define F_GETLK64 12 /* using 'struct flock64' */
144#define F_SETLK64 13
145#define F_SETLKW64 14
146#endif
147
148#ifndef HAVE_ARCH_STRUCT_FLOCK64 168#ifndef HAVE_ARCH_STRUCT_FLOCK64
149#ifndef __ARCH_FLOCK64_PAD 169#ifndef __ARCH_FLOCK64_PAD
150#define __ARCH_FLOCK64_PAD 170#define __ARCH_FLOCK64_PAD