BUF_UNLOCK(9)

πŸ’– BUF_UNLOCK(9) β€” Kernel Developer's Manual πŸ’–

okay bestie, so this one is from the Kernel Developer's Manual, section 9 β€” the big-kid kernel section, iykyk 🧚


✨ NAME ✨

BUF_UNLOCK β€” unlocks a locked buffer πŸ”“

like. it literally does the one thing. it unlocks the buffer. no cap.


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/bio.h>
#include <sys/buf.h>

void
BUF_UNLOCK(struct buf *bp);

look at all those includes, she's thorough πŸ’… every single one stays, don't skip them, they're not decor they're load-bearing.


πŸŽ€ DESCRIPTION πŸŽ€

The BUF_UNLOCK() function unlocks a buffer that was previously locked with BUF_LOCK() or BUF_TIMELOCK().

that's the whole vibe. lock it, then unlock it. the circle of life. πŸ¦‹

Its argument is:

  • bp β€” the buffer to unlock. the buffer must already be locked. πŸ‘‘
okay so real talk: if you call this on a buffer that isn't locked, you're not being cute, you're being chaotic. it says "must already be locked" and it means it. lock her first. πŸ”₯

🌈 SEE ALSO 🌈

go read BUF_LOCK(9) and BUF_TIMELOCK(9) too, they're the prequel, you can't just watch the last episode bestie 😭


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Chad David <davidc@acns.ab.ca>.

Chad. iconic name, iconic contribution, we love him for it. 🫢


and that's the tea, bestie β€” this page is from Debian, dated July 9, 2001, and it's still out here doing its lil job in the kernel docs. go forth and unlock responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from