2 libulockmgr: Userspace Lock Manager Library
3 Copyright (C) 2006 Miklos Szeredi <miklos@szeredi.hu>
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB.
11 #include <sys/types.h>
14 * Perform POSIX locking operation
16 * @param fd the file descriptor
17 * @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW)
18 * @param lock the lock parameters
19 * @param owner the lock owner ID cookie
20 * @param owner_len length of the lock owner ID cookie
21 * @return 0 on success -errno on error
23 int ulockmgr_op(int fd
, int cmd
, struct flock
*lock
, const void *owner
,