blob: ad555799f5a122e874ff29ebaf16c505be892740 [file] [log] [blame]
bigbiff bigbiff9c754052013-01-09 09:09:08 -05001/*
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 */
23int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
24 size_t owner_len);