Tizen 2.1 base
[framework/base/fuse.git] / include / ulockmgr.h
1 /*
2   libulockmgr: Userspace Lock Manager Library
3   Copyright (C) 2006  Miklos Szeredi <miklos@szeredi.hu>
4
5   This program can be distributed under the terms of the GNU LGPLv2.
6   See the file COPYING.LIB.
7 */
8
9 #include <stdint.h>
10 #include <fcntl.h>
11 #include <sys/types.h>
12
13 /**
14  * Perform POSIX locking operation
15  *
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
22  */
23 int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
24                 size_t owner_len);