smp_call_fun...single_async(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ smp_call_function_single_async(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's a lil function that yeets a function onto one specific CPU and then dips without waiting, which is honestly main character energy. let's get into it πŸŽ€


🌸 NAME 🌸

smp_call_function_single_async β€” run an asynchronous function on one specific CPU.


⭐ SYNOPSIS ⭐

int smp_call_function_single_async (int cpu , call_single_data_t *csd );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • cpu β€” the CPU you want it to run on, like literally which one 🫢
  • csd β€” a pre-allocated, already-set-up data structure. you bring your own, no cap.

πŸ’– DESCRIPTION πŸ’–

so it's like smp_call_function_single but the call is asynchronous, which lowkey means you can do it from contexts where interrupts are disabled. iconic behaviour honestly.

the caller passes their own pre-allocated data structure (like, embedded in an object, iykyk) and is responsible for synchronizing it so that the IPIs performed on the csd are strictly serialized. that part is on you, bestie πŸ’€

and if you call the function with a csd that hasn't been processed yet by a previous call to smp_call_function_single_async, it will return immediately with -EBUSY, showing that the csd object is still in progress. it's giving "not right now, I'm busy" πŸ™ˆ


πŸ‘‘ NOTE πŸ‘‘

be careful β€” unfortunately there is, like, no current debugging facility to validate the correctness of this serialization. so if you get it wrong, nobody's gonna tell you 😭 ty for your service.

🌈 RETURN 🌈

0 on success, or a negative errno value on error. slay (or don't) ✨


πŸ“ SEE ALSO πŸ“


and that's the whole page bestie 🧚 brought to you by ./kernel, dated October 2026 β€” go forth and serialize responsibly πŸ’œπŸŒΈ

πŸ“¦ where this page comes from