lockdep_hardirqs_on_prepare(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lockdep_hardirqs_on_prepare β€” like, the kernel API manual bestie πŸ’…

okay so you're looking at lockdep_hardirqs_on_prepare(9), which lives in the Kernel API Manual section (section 9, if that matters to you β€” it does, it's giving "documented and proud" ✨). no cap, this is one of those tiny functions that does a lot of quiet emotional labor for the kernel, and honestly? we stan. 🫢


✨ NAME ✨

lockdep_hardirqs_on_prepare β€” the little prep step that gets you ready to enable interrupts 🌸

like, think of it as the "bestie, fix your hair before you go out" of interrupt handling. it doesn't turn the interrupts on itself, it just makes sure everything's cute first. πŸ’–


✨ SYNOPSIS ✨

void lockdep_hardirqs_on_prepare (void );

that's it. that's the whole signature. no parameters, no arguments, no drama. clean, iconic, minimal. πŸ‘‘


✨ ARGUMENTS ✨

  • void β€” literally no arguments. zero. none. she takes nothing from you and asks for nothing in return. main character energy fr fr πŸŽ€

✨ DESCRIPTION ✨

okay so here's the tea β˜•:

This function gets invoked before a possible transition to RCU idle from exit to user or guest mode. Read that again. Slowly. It's the "last call" moment β€” right before the kernel heads out of user mode or guest mode, and there's a chance RCU is about to go idle. πŸ¦‹

And what does it do about it? It ensures that all RCU operations are done before RCU stops watching. That's the whole vibe. Nothing sneaky sneaky happening in the background that RCU would miss once it stops looking. No loose threads. no unfinished business. she checked. βœ…

⚠️ heads up bestie: this is only the prep. After the RCU transition, you still have to invoke lockdep_hardirqs_on to set the final state. lockdep_hardirqs_on_prepare is not the finale β€” it's the opening act. don't skip the second half, i'm begging 😭 πŸ’€

✨ SEE ALSO ✨

if you're nosy like me (and you are πŸ’…), go peek at:

  • Kernel file ./kernel/locking/lockdep.c β€” the whole squad lives here 🏠
  • struct pending_free(9) β€” pending stuff, freeing stuff, iconic
  • struct delayed_free(9) β€” the "i'll get to it later" of structs
  • struct lock_trace(9) β€” tracing but make it locks
  • lockdep_cleanup_dead_cpu(9) β€” cleanup era, CPU edition πŸ”₯

πŸ’œ reminder: no arguments, no return value, just vibes and RCU correctness. lowkey the best kind of function.

and that's the page!! she's from ./kernel/locking, dated October 2026, and her name is lockdep_hardirqs_on_prepare(9) β€” remember it, cite it, hydrate, and always call your lockdep_hardirqs_on afterwards πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒˆπŸŒ·

πŸ“¦ where this page comes from