BUF_RECURSED(9)

πŸ’– BUF_RECURSED πŸ’–

okay bestie so this is a page from the Kernel Developer's Manual, section 9, and it's all about one tiny little function called BUF_RECURSED β€” checks if the lock linked to the buffer is recursed. yes it's niche, no it's not boring, we're getting into it 🫢


✨ NAME ✨

BUF_RECURSED β€” checks if the lock linked to the buffer is recursed

literally that's the whole job. it checks. it tells you. iconic behaviour tbh πŸ’…


🌸 SYNOPSIS 🌸

first you gotta invite the right headers to the function, no gatekeeping:

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

int
BUF_RECURSED(struct buf *bp);

see how it returns an int? that's your answer right there. ok moving on ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the BUF_RECURSED() function checks if the lock linked to the given buffer is recursed, and returns 1 if the condition is true, 0 otherwise. that's it. that's the function. simple, clean, does exactly what it says on the tin fr fr πŸ’–

its argument is:

that's the whole argument list, one singular king, main character energy πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

if you liked this page, you will LOVE these:

go read them, they're the friend group 🫢


πŸŽ€ AUTHORS πŸŽ€

this manual page was written by Attilio Rao <attilio@FreeBSD.org>. ty for your service, king πŸ’


k that's the whole page bestie, you now know everything there is to know about BUF_RECURSED, no cap 🌈

and for the record β€” this one came from Debian, dated January 22, 2008, which is lowkey vintage of it. slay πŸ’…βœ¨

πŸ“¦ where this page comes from