* Fix stack alignment for clone()
[fuse.git] / include / ulockmgr.h
blobad555799f5a122e874ff29ebaf16c505be892740
1 /*
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.
7 */
9 #include <stdint.h>
10 #include <fcntl.h>
11 #include <sys/types.h>
13 /**
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,
24 size_t owner_len);