smp_call_fun...single_async(9)
β¨ 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 π
- kernel file
./kernel/smp.c csd_lock_is_stuck(9)generic_smp_call_function_single_interrupt(9)__flush_smp_call_function_queue(9)flush_smp_call_function_queue(9)smp_call_function_single(9)smp_call_function_any(9)smp_call_function_many(9)smp_call_function(9)on_each_cpu_cond_mask(9)kick_all_cpus_sync(9)wake_up_all_idle_cpus(9)cpus_peek_for_pending_ipi(9)struct smp_call_on_cpu_struct(9)smp_call_on_cpu(9)
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
- 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