aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-09-10 20:53:36 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2006-09-10 20:53:36 +0000
commit0c59ebfc9b811c60fcf808a5de33320eeeb394af (patch)
tree3f906a752cc13a2f46b177b6a8fdcd9df2503309 /include
parent349bdda3524368ee30dc92cafb6914717017fcdd (diff)
downloadlibfuse-0c59ebfc9b811c60fcf808a5de33320eeeb394af.tar.gz
ulockmgr
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am2
-rw-r--r--include/ulockmgr.h23
2 files changed, 24 insertions, 1 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index c786a0d..be2c592 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -11,6 +11,6 @@ fuseinclude_HEADERS = \
fuse_lowlevel_compat.h \
fuse_opt.h
-include_HEADERS = old/fuse.h
+include_HEADERS = old/fuse.h ulockmgr.h
noinst_HEADERS = fuse_kernel.h
diff --git a/include/ulockmgr.h b/include/ulockmgr.h
new file mode 100644
index 0000000..4cd7b1c
--- /dev/null
+++ b/include/ulockmgr.h
@@ -0,0 +1,23 @@
+/*
+ libulockmgr: Userspace Lock Manager Library
+ Copyright (C) 2006 Miklos Szeredi <miklos@szeredi.hu>
+
+ This program can be distributed under the terms of the GNU LGPL.
+ See the file COPYING.LIB.
+*/
+
+#include <stdint.h>
+#include <fcntl.h>
+
+/**
+ * Perform POSIX locking operation
+ *
+ * @param fd the file descriptor
+ * @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW)
+ * @param lock the lock parameters
+ * @param owner the lock owner ID cookie
+ * @param owner_len length of the lock owner ID cookie
+ * @return 0 on success -errno on error
+ */
+int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
+ size_t owner_len);