ww_mutex_is_locked(9)
β¨ ww_mutex_is_locked(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one is a lil baby page, it's literally just one question and one answer, and honestly? iconic. it's giving "short and sweet, knows exactly what it is."
πΈ NAME πΈ
ww_mutex_is_locked β is the w/w mutex locked π
like, that's it. that's the whole vibe. you're checking if the thing is locked.
π¦ SYNOPSIS π¦
bool ww_mutex_is_locked (struct ww_mutex *lock );
that's the whole signature, no cap. returns a bool, takes a pointer to a struct ww_mutex named lock, and yes the spacing is exactly like that so copy it character for character, mwah π
π ARGUMENTS π
lockβ the mutex to be queried π«Ά like, this is the actual w/w mutex you're asking the question about. no mutex, no answer, iykyk.
π DESCRIPTION π
okay so here's the whole deal, and it's genuinely so simple it's sending me π
Returns 1 if the mutex is locked, 0 if unlocked.
that's it!! that's the function!! it's a vibe check for your w/w mutex. locked? 1. unlocked? 0. no middle ground, no maybe, no "it's complicated" β just a clean lil boolean and honestly we love that for us π
heads up bestie: this is a query, not a lock. it just tells you the state, it doesn't do anything to the mutex. read the room, don't touch the vibe π
β SEE ALSO β
go read these next, bestie, they're the whole friend group π§ the kernel file lives at ./include/linux/ww_mutex.h and here's the squad:
ww_mutex_init(9)ww_acquire_init(9)ww_acquire_done(9)ww_acquire_fini(9)ww_mutex_lock(9)ww_mutex_lock_interruptible(9)ww_mutex_lock_slow(9)ww_mutex_lock_slow_interruptible(9)
all of them, in that order, no skips π₯
and that's the page!! slay πβ¨
cute lil sign-off: this one's from the ./include/linux directory, dated October 2026, and it's ww_mutex_is_locked(9) saying bye bestie, go check your locks responsibly ππΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms