cpu_function_call(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpu_function_call(9) πŸ’…

okay so real talk, bestie β€” welcome to the Kernel API Manual, and today's main character is cpu_function_call, from the (9) section (that's the kernel-functions girlies, iykyk). This one's a little cross-CPU errand runner and honestly? iconic.


✨ NAME ✨

cpu_function_call β€” call a function on the cpu 🫢

Like, you've got a function, you've got a cpu, and you want that function to happen over there. That's the whole vibe.


🌸 SYNOPSIS 🌸

int cpu_function_call (int cpu , remote_function_f func , void *info );

Yep, that's the whole signature. Three little args and an int coming back at you. Slay.


πŸŽ€ ARGUMENTS πŸŽ€

  • cpu β€” the target cpu you're queueing this function onto. Like, which cpu is getting the message. πŸ‘‘
  • func β€” the actual function that's gonna get called. The star of the show, fr fr. ⭐
  • info β€” the argument that gets handed to that function call. The little care package it carries along. 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: it calls the function func on the remote cpu. That's it. That's the whole thing. No cap, no hidden lore β€” you point at a cpu, you point at a function, and the function gets called over there on that remote cpu. ✨


πŸ”₯ RETURN πŸ”₯

You get back the func return value β€” or -ENXIO when the cpu is offline. 😭 So if your target cpu is having a little nap (offline, bestie, it's gone), you're getting -ENXIO and that's your answer.

ngl, -ENXIO is the "no such device or address" heartbreak. cpu offline = no function call for you. πŸ’€

🌈 SEE ALSO 🌈

All of those are absolutely worth a peek if you're going down the ./kernel/events rabbit hole πŸ‡βœ¨


okay that's the page!! mwah πŸ’‹ sign-off time: this little masterpiece lives in ./kernel/events, dated October 2026, and it'll always be cpu_function_call(9) to us πŸŽ€πŸ’œ bye bestie, go call some functions!! πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from