clear_pending_set_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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

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