spi_set_thread_rt(9)
π spi_set_thread_rt(9) π
okay so bestie, welcome to the Kernel API Manual β yes that's the manual name, no I will not be normal about it. today's main character is spi_set_thread_rt(9) and she is literally just here to make a thread go fast. β¨
π NAME
spi_set_thread_rt β set the controller to pump at realtime priority π₯
β¨ SYNOPSIS
void spi_set_thread_rt (struct spi_controller *ctlr );
that's it. that's the whole signature. no return value, she just does the thing. π«Ά
πΈ ARGUMENTS
ctlrβ the controller to boost priority of π like, the one who's getting the glow-up.
π¦ DESCRIPTION
so here's the tea β β you can call this for one of two reasons:
- the controller itself asked for realtime priority, by setting the
->rtvalue before callingspi_register_controller, or - some device hanging out on the bus was like "bestie my transfers need realtime priority" and now everybody's involved. π
either way, this is the function that goes "say less" and bumps the thread up. π§
π NOTE
okay so slight caveat, gotta be honest with you π β at the moment, if any device on a bus says it needs realtime, then the thread will be at realtime priority for all transfers on that controller. like, all of them. not just the ones that asked. it's giving "one kid raises their hand and the whole class gets detention" energy. π
if this eventually becomes a problem, the plan is we may see if we can find a way to boost the priority only temporarily, during the relevant transfers. key word may. no promises, it's a vibe check for future-us. β¨
π SEE ALSO
the whole friend group, in Kernel file ./drivers/spi/spi.c β go say hi to all of them: π«Ά
__spi_register_driver(9)spi_alloc_device(9)spi_add_device(9)spi_new_device(9)spi_unregister_device(9)spi_register_board_info(9)spi_res_alloc(9)spi_res_free(9)spi_res_add(9)spi_res_release(9)spi_finalize_current_transfer(9)__spi_pump_messages(9)spi_pump_messages(9)spi_take_timestamp_pre(9)spi_take_timestamp_post(9)spi_get_next_queued_message(9)spi_finalize_current_message(9)spi_queued_transfer(9)spi_flush_queue(9)of_register_spi_devices(9)spi_new_ancillary_device(9)devm_spi_new_ancillary_device(9)acpi_spi_count_resources(9)acpi_spi_device_alloc(9)spi_target_abort(9)__spi_alloc_controller(9)__devm_spi_alloc_controller(9)spi_get_gpio_descs(9)spi_register_controller(9)devm_spi_register_controller(9)spi_unregister_controller(9)spi_replace_transfers(9)spi_split_transfers_maxsize(9)spi_split_transfers_maxwords(9)spi_set_cs_timing(9)spi_setup(9)spi_optimize_message(9)spi_unoptimize_message(9)devm_spi_optimize_message(9)spi_async(9)spi_sync(9)spi_sync_locked(9)spi_bus_lock(9)spi_bus_unlock(9)spi_write_then_read(9)
and that's the whole page, bestie. no cap, every flag accounted for, we ate and left no crumbs. π
so yeah β this came out of ./drivers/spi, dated October 2026, manual spi_set_thread_rt(9). mwah π πβ go boost some priorities, ily, byeeeee π¦π
π¦ 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