clear_pending_set_locked(9)
π clear_pending_set_locked(9) β Kernel API Manual, but make it make sense
okay so bestie, gather round, because we're diving into clear_pending_set_locked β yes that's a whole mouthful, and yes it's from the Kernel API Manual, and no you're not gonna be scared of it by the end of this page. periodt. β¨
πΈ NAME
clear_pending_set_locked β take ownership and clear the pending bit.
like, it literally says what it does on the tin, and honestly? iconic behaviour. π
π¦ SYNOPSIS
void clear_pending_set_locked (arena_spinlock_t __arena *lock );
that's it. that's the whole signature. no cap, she's simple like that. π
π ARGUMENTS
lockβ Pointer to queued spinlock structure. yeah, it's the lock you're working with, she's the main character here. π«Ά
β¨ DESCRIPTION
okay so here's the little glow-up moment this function performs:
*,1,0 -> *,0,1
read it like a before-and-after pic π β the pending bit gets cleared, the locked bit gets set, and the lock has officially been taken. slay.
β οΈ real talk though: Lock stealing is not allowed if this function is used. like, fr fr, that's the rule β no sneaky little shortcuts around this one. π
π SEE ALSO
- Kernel file π β
./tools/testing/selftests/bpf/libarena/include/bpf_arena_spin_lock.h xchg_tail(9)clear_pending(9)set_locked(9)arena_spin_trylock(9)arena_spin_lock(9)arena_spin_unlock(9)
go read those too, bestie, the whole friend group ate. π₯
anddd that's the page! source-squad credit goes to ./tools/testing/selftests/bpf/... and the date stamp is October 2026 β β mwah, thanks for reading, ily, bye! π§ π
π¦ 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