VOP_ADVLOCK(9)

VOP_ADVLOCK9

Advisory record locking

Usage

#include <sys/param.h>

#include <sys/vnode.h>

#include <sys/fcntl.h>

#include <sys/lockf.h>

int

VOP_ADVLOCK(struct vnode *vp, caddr_t id, int op, struct flock *fl, int flags);

Overview

The arguments are:

vp

The vnode being manipulated.

id

The id token which is changing the lock.

op

The operation to perform (see fcntl(2)).

fl

Description of the lock.

flags

One of more of the following:

F_RDLCK

Shared or read lock.

F_UNLCK

Unlock.

F_WRLCK

Exclusive or write lock.

F_WAIT

Wait until lock is granted.

F_FLOCK

Use flock(2) semantics for lock.

F_POSIX

Use POSIX semantics for lock.

This entry point manipulates advisory record locks on the file. Most file systems delegate the work for this call to lf_advlock().

Return values

Zero is returned on success, otherwise an error is returned.

Authors

This manual page was written by Doug Rabson.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.