rtapi_task_self(3rtapi)
β¨ rtapi_task_self β¨
okay bestie, welcome to the RTAPI section of the manual β this one's a lil baby page but it's so useful, i promise π«Ά
π NAME π
rtapi_task_self β retrieve ID of current task
π SYNTAX π
void rtapi_task_self()
π¦ DESCRIPTION π¦
so like. rtapi_task_self goes and fetches the current task for you. that's it. that's the whole job. main character behaviour tbh π
but listen β if you're not inside a realtime task, it doesn't vibe with you, and it hands back -EINVAL instead. when does that happen? think startup code, think shutdown code. yeah. those times. π
πΈ REALTIME CONSIDERATIONS πΈ
you can call this one from init/cleanup code, and also from inside realtime tasks. so basically she's flexible. she gets around. queen. π
β RETURN VALUE β
- the task number that
rtapi_task_newgave you earlier, or -EINVAL
that's the whole menu, no cap. π
π SEE ALSO π
ngl if you got here by accident, you probably wanted rtapi_task_new(3rtapi) first. go make a task, then come back and ask her who she is. iykyk π₯
mwah π that's the whole page, babes β this one's from the LinuxCNC Documentation, dated 2015-04-18, and it lives in the rtapi_task_self(3rtapi) manual. go slay ur realtime tasks, fr fr π§β¨
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace-dev 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace-dev 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms