BUF_TIMELOCK(9)
β¨ BUF_TIMELOCK(9) β¨
okay bestie, welcome to the Kernel Developer's Manual π
this one's called BUF_TIMELOCK, and it lives in section 9 (kernel land, iykyk) β she locks a buffer, but make it timeout energy β°π¦
πΈ NAME πΈ
BUF_TIMELOCK β locks a buffer π
π§ SYNOPSIS π§
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/bio.h>
#include <sys/buf.h>
int
BUF_TIMELOCK(struct buf *bp, int locktype, char *wmesg, int catch,
int timo);
like. look at her. five args, one int, zero chill π
π DESCRIPTION π
So the way that BUF_TIMELOCK() works is: it locks the buffer you hand it, and it puts a cap on how long it's allowed to sleep β that cap is timo. It also OR's catch into the sleep's priority. and wmesg is the wmesg used in the sleep. no notes, that's just the vibe π
Her arguments, one by one, no gatekeeping:
bpβ the buffer to lock. this is the main character of the whole operation πlocktypeβ flags that control the type of lock. for the details, go readlockmgr(9), she has the lore πwmesgβ thewmesgused in any sleeps while acquiring the lock π΄catchβ priority that gets OR'd into the sleep's priority πtimoβ the timeout for any sleeps encountered during the lock. so if she's sleeping too long, that's the cutoff β³
π₯ RETURN VALUES π₯
A value of 0 is returned on success. slay. β
For details on what the non-zero return values mean, see lockmgr(9) β she's got the receipts π§Ύ
π SEE ALSO π
go read them, bestie, it's giving β¨well-rounded kernel devβ¨
π«Ά AUTHORS π«Ά
This manual page was written by Chad David <davidc@acns.ab.ca>. ty for your service, king π
π lowkey reminder: every flag, every argument, every default up there is doing real work β don't skip thelocktypedetails,lockmgr(9)is right there.
Debian Β· July 9, 2001 Β· BUF_TIMELOCK(9) β ok that's the whole page, mwah, go lock some buffers responsibly π
πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms