claim_tcs_for_req(9)
π claim_tcs_for_req(9) β the Kernel API Manual page, but make it make sense π
okay so bestie, welcome to the glow-up of claim_tcs_for_req, straight out of the Kernel API Manual. this one's a function, it lives in the kernel, and it's about to claim a tcs for you. let's get into it π
β¨ NAME β¨
claim_tcs_for_req β claim a tcs in the given tcs_group; only for active. that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
int claim_tcs_for_req (struct rsc_drv *drv , struct tcs_group *tcs ,
const struct tcs_request *msg );
she takes three things and gives you back an int. iconic signature, honestly π«Ά
π¦ ARGUMENTS π¦
drvβ the controller. that's the main character in this whole situation πtcsβ thetcs_groupused forACTIVE_ONLYtransfers. note theACTIVE_ONLY, it's literally the whole point π₯msgβ the data to be sent. the payload. the moment. the reason we're all here π
π DESCRIPTION π
so what does she actually do? she claims a tcs in the given tcs_group, and while she's at it she makes sure that no existing cmd is already in flight that would conflict with the one in msg. like, she's not just grabbing a spot β she's doing a whole vibe check on the in-flight traffic first. considerate queen behaviour, fr fr β¨
β CONTEXT β
okay this part is important, do not skip it π:
must be called with thedrv->lockheld, since that's what protectstcs_in_use.
so like, hold the lock. or else. π
π RETURN π
she returns the id of the claimed tcs π β or -EBUSY if a matching msg is in flight, or if the tcs_group is full. busy girl, full house, either way you get -EBUSY π
π§ SEE ALSO π§
kernel file ./drivers/soc/qcom/rpmh-rsc.c, plus the whole friend group:
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)find_free_tcs(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)
go read them, they're all lowkey obsessed with each other iykyk π¦
and that's the page!! π this little beauty lives in ./drivers/soc/qcom and the manual's dated October 2026 β so like, future-proof and slaying. mwah, bye bestie π
π
π¦ 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