about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2014-07-23 14:21:05 -0400
committerCarlos O'Donell <carlos@redhat.com>2014-07-29 23:27:21 -0400
commit0961f7e1e300ef633b0c1ad95d0999fb5c169f4e (patch)
tree08b1ae51840c0b69a0c4bf9f98b8a71b919d2fa0 /sysdeps/unix
parentcc5fb300fce0c7ce1923d6f5c776fa83be47d55e (diff)
downloadglibc-0961f7e1e300ef633b0c1ad95d0999fb5c169f4e.tar.gz
glibc-0961f7e1e300ef633b0c1ad95d0999fb5c169f4e.tar.xz
glibc-0961f7e1e300ef633b0c1ad95d0999fb5c169f4e.zip
fcntl-linux.h: add new definitions and manual updates for open file description locks
Open file description locks have been merged into the Linux kernel for
v3.15.  Add the appropriate command-value definitions and an update to
the manual that describes their usage.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/bits/fcntl-linux.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index 527eb5c8b5..e224dab58b 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -117,6 +117,23 @@
 # define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 #endif
 
+/* open file description locks.
+
+   Usually record locks held by a process are released on *any* close and are
+   not inherited across a fork.
+
+   These cmd values will set locks that conflict with process-associated record
+   locks, but are "owned" by the opened file description, not the process.
+   This means that they are inherited across fork or clone with CLONE_FILES
+   like BSD (flock) locks, and they are only released automatically when the
+   last reference to the the file description against which they were acquired
+   is put. */
+#ifdef __USE_GNU
+# define F_OFD_GETLK	36
+# define F_OFD_SETLK	37
+# define F_OFD_SETLKW	38
+#endif
+
 #ifdef __USE_LARGEFILE64
 # define O_LARGEFILE __O_LARGEFILE
 #endif