FUNCTION::TASK_STATE(3stap)
π FUNCTION::TASK_STATE π
okay bestie, welcome to the 3stap manual β that's the SystemTap Tapset Reference, specifically the Context Functions section, and today's main character is function::task_state β¨
πΈ NAME πΈ
function::task_state β the state of the task π«Ά
like. literally just. what is this task doing right now. that's the whole vibe check π
β¨ SYNOPSIS β¨
task_state:long(task:long)
one function, one argument, one long coming back at you. no notes π
π ARGUMENTS π
taskβ atask_structpointer π§ that's the little kernel struct that is the task. hand it over and we'll tell you what it's up to.
π DESCRIPTION π
So it returns the state of the given task, and it's gonna be one of these, no cap:
TASK_RUNNING(0)TASK_INTERRUPTIBLE(1)TASK_UNINTERRUPTIBLE(2)TASK_STOPPED(4)TASK_TRACED(8)EXIT_ZOMBIE(16)EXIT_DEAD(32)
those are the numbers, those are the names, that's the whole menu π₯ (and yeah, notice how the numbers are all powers of two β they're bit flags, iykyk π¦ but fr fr, the function gives you one of the values above.)
π SEE ALSO π
SystemTap Tapset Reference, Version β dated September 2026 π mwah, that's the whole page, ty for coming to my ted talk, go check your task states bestie ππΈππ¦π«Άπ
π¦ where this page comes from
- centos-stream 10: systemtap-client 5.6-3.el10 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- centos-stream 9: systemtap-client 5.6-3.el9 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 43: systemtap-client 5.6-1.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 44: systemtap-client 5.6-1.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms