cpu_function_call(9)
π 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 π
- Kernel file
./kernel/events/core.cβ like, go read the source, it's giving main character energy π task_function_call(9)sys_perf_event_open(9)perf_event_create_kernel_counter(9)
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
- 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