BUF_LOCKFREE(9)

πŸ’… BUF_LOCKFREE(9) β€” bestie edition

okay so you found your way into the Kernel Developer's Manual and you wanna know about BUF_LOCKFREE β€” the macro that yeets a buffer lock into the void. no cap, that's literally the whole vibe. let's get into it ✨


🌸 NAME 🌸

BUF_LOCKFREE β€” destroys a buffer's lock 🫢


✨ SYNOPSIS ✨

bestie you gotta bring the right headers to the function. don't show up empty-handed πŸ’…

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

void
BUF_LOCKFREE(struct buf *bp);

πŸ¦‹ DESCRIPTION πŸ¦‹

The BUF_LOCKFREE() macro destroys the buffer lock. that's it. that's the job. it's giving "demolition crew but for locks" πŸŽ€

⚠️ THE LOCK MUST NOT BE HELD WHEN THIS MACRO IS CALLED β€” or a panic will result. and not the fun kind of panic. the kernel kind. πŸ’€ like, do NOT call this while you're still holding the lock, fr fr. that's the whole boundary and you must respect it.

Its argument is:

  • bp β€” the buffer whose lock is to be destroyed. yes queen, hand over the buffer, we're taking its lock out back 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

the whole squad, all linked up 🫢


πŸ’– AUTHORS πŸ’–

This manual page was written by Chad David <davidc@acns.ab.ca>. iconic behavior honestly, thank you for your service 🫑✨


and that's the whole page bestie, you ate it πŸ’…πŸŒΈ

Debian Β· July 9, 2001 Β· BUF_LOCKFREE(9) β€” periodt, no notes, go free those locks (safely!!) πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from