blob: c3ceef5d07f9481828703d5a95b6d3dbfa1abba1 [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
Matt Mower523a0592015-12-13 11:31:00 -06009#include "fuse_lowlevel.h"
10
bigbiff bigbiff9c754052013-01-09 09:09:08 -050011#include <stdint.h>
12#include <fcntl.h>
13#include <sys/types.h>
14
15/**
16 * Perform POSIX locking operation
17 *
18 * @param fd the file descriptor
19 * @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW)
20 * @param lock the lock parameters
21 * @param owner the lock owner ID cookie
22 * @param owner_len length of the lock owner ID cookie
23 * @return 0 on success -errno on error
24 */
25int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
26 size_t owner_len);