VOP_ADVLOCK(9)
π VOP_ADVLOCK(9) β Kernel Developer's Manual, but make it bestie-core β¨
β¨ NAME β¨
VOP_ADVLOCK β advisory record locking, and honestly itβs giving kernel-lock main character energy π
π SYNOPSIS π
Okay so first you gotta include these, no skipping, bestie:
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/fcntl.h>
#include <sys/lockf.h>
Then the function signature, literally:
int
VOP_ADVLOCK(struct vnode *vp, caddr_t id, int op, struct flock *fl,
int flags);
π¦ DESCRIPTION π¦
This entry point manipulates advisory record locks on the file. Most file systems delegate the work for this call to lf_advlock(). Thatβs the tea β simple on the surface, with a whole delegation situation underneath π
Hereβs what the arguments are giving:
vpβ the vnode being manipulated. Main character of this call, honestly.idβ the id token which is changing the lock. Itβs the little name tag on the lock-changing situation.opβ the operation to perform (seefcntl(2)). Yes, go look atfcntl(2)for the op lore.flβ the description of the lock. The lockβs whole look, described.flagsβ one or more of the following, bestie:F_WAITβ Wait until lock is granted.F_FLOCKβ Useflock(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.
π RETURN VALUES π
Zero is returned on success, otherwise an error is returned. Thatβs it. Zero = slay, error = not the vibe periodt π
π SEE ALSO π
π«Ά AUTHORS π«Ά
This manual page was written by Doug Rabson. Author icon behavior, we stan π«Άβ¨
π Signed, sealed, delivered: Debian, February 10, 2021, VOP_ADVLOCK(9) β thatβs the manual, bestie. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms