find_free_tcs(9)
πΈ find_free_tcs(9) πΈ
okay so bestie, welcome to the Kernel API Manual β today's main character is find_free_tcs(9) and honestly? she's a little legend. let's get into it π
β¨ NAME β¨
find_free_tcs β literally just finds free tcs in the given tcs_group. and like, only for active. that part matters, don't @ me π
β¨ SYNOPSIS β¨
int find_free_tcs (struct tcs_group *tcs );
that's it. that's the whole vibe check. one arg, one int coming back at you π¦
β¨ ARGUMENTS β¨
tcsβ a pointer to the active-onlytcs_group(or, plot twist, the waketcs_groupif we borrowed it because there are literally zero active-only ones β like when your bestie has no charger so you lend her yours, no cap π₯)
β¨ DESCRIPTION β¨
so here's the tea: you must call this with the drv->lock held, because that lock is what protects tcs_in_use. don't skip the lock bestie, that's the whole safety girlie of this operation ππ
β¨ RETURN β¨
it hands you back the first tcs that's free β or, if every single one is in use, -EBUSY. that's it, that's the answer π
β¨ SEE ALSO β¨
kernel file ./drivers/soc/qcom/rpmh-rsc.c β and the whole friend group, because nobody does it alone π«Ά:
tcs_invalidate(9)rpmh_rsc_invalidate(9)get_tcs_for_msg(9)get_req_from_tcs(9)__tcs_set_trigger(9)enable_tcs_irq(9)tcs_tx_done(9)__tcs_buffer_write(9)check_for_req_inflight(9)claim_tcs_for_req(9)rpmh_rsc_send_data(9)find_slots(9)rpmh_rsc_write_ctrl_data(9)rpmh_rsc_ctrlr_is_busy(9)rpmh_rsc_write_next_wakeup(9)rpmh_rsc_cpu_pm_callback(9)rpmh_rsc_pd_callback(9)
ok that's the whole page, go be iconic with your tcs π
sign-off era: this slay little page lives at ./drivers/soc/qcom, dated October 2026, and yes β it's find_free_tcs(9) again, because we always come back to her πβ¨
π¦ 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