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 or more of the following:

F_WAIT

Wait until lock is granted.

F_FLOCK

Use flock(2) semantics for lock.

F_POSIX

Use POSIX semantics for lock.

F_REMOTE

Lock owner is remote NFS client.

F_NOINTR

Mask signals while waiting for the 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.

Releases

83 releases since FreeBSD 2.2.2-RELEASE; the text changed 42 times.

  1. 2.2.2–2.2.8
  2. 2.2.9
  3. 3.0–3.2
  4. 3.3–3.5.1
  5. 4.0–4.3
  6. 4.4
  7. 4.5–4.11
  8. 5.0–5.1
  9. 5.2–5.5
  10. 6.0–6.3
  11. 6.4
  12. 7.0
  13. 7.1
  14. 7.2
  15. 7.3
  16. 7.4
  17. 8.0
  18. 8.1
  19. 8.2
  20. 8.3
  21. 8.4
  22. 9.0
  23. 9.1
  24. 9.2
  25. 9.3
  26. 10.0
  27. 10.1
  28. 10.2
  29. 10.3
  30. 10.4
  31. 11.0
  32. 11.1
  33. 11.2
  34. 11.3
  35. 11.4
  36. 12.0
  37. 12.1
  38. 12.2
  39. 12.3
  40. 12.4
  41. 13.0
  42. 13.1–13.2
  43. 13.3–16.0

Authors

This manual page was written by Doug Rabson.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.