smp_call_function(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smp_call_function(9) β€” like, the Kernel API Manual, bestie ✨

okay so this is smp_call_function from the kernel API manual and honestly? it's kind of a baddie. it runs your function on all the other CPUs. no cap. 🫢


✨ NAME ✨

smp_call_function β€” run a function on all the other CPUs πŸ’–


🌸 SYNOPSIS 🌸

void smp_call_function (smp_call_func_t func , void *info , int wait );

πŸŽ€ ARGUMENTS πŸŽ€

  • func β€” the function you want to run. and like, it must be fast and non-blocking, okay? this is not the vibe for your long dramatic main-character computation 😭
  • info β€” literally just an arbitrary pointer that gets passed through to the function. do whatever with it, queen πŸ¦‹
  • wait β€” if true, wait (atomically!) until the function has completed on the other CPUs. atomically is doing a lot of work in that sentence ngl πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So if wait is true, then it returns once func has returned. otherwise it returns just before the target cpu calls func β€” the way that timing works is so specific, iykyk ⭐

big warning energy: you must not call this function with disabled interrupts, or from a hardware interrupt handler, or from a bottom half handler. like, don't. seriously. πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./kernel/smp.c and honestly the whole friend group:


okay that's the whole page, mwah πŸ’‹ this one's from ./kernel, dated October 2026, and it's filed under smp_call_function(9) β€” slay, go forth and call your functions on all the other CPUs responsibly πŸ§šπŸ’œ

πŸ“¦ where this page comes from