From 0c59ebfc9b811c60fcf808a5de33320eeeb394af Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sun, 10 Sep 2006 20:53:36 +0000 Subject: ulockmgr --- include/ulockmgr.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/ulockmgr.h (limited to 'include/ulockmgr.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 + + This program can be distributed under the terms of the GNU LGPL. + See the file COPYING.LIB. +*/ + +#include +#include + +/** + * 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); -- cgit v1.2.3