FUNCTION::TASK\_STATE(3stap) Context Functions FUNCTION::TASK\_STATE(3stap)

# [NAME](#NAME)

function::task\_state - The state of the task

# [SYNOPSIS](#SYNOPSIS)

```


    task_state:long(task:long)
```

# [ARGUMENTS](#ARGUMENTS)

*task*

task\_struct pointer

# [DESCRIPTION](#DESCRIPTION)

Return the state of the given task, one of: TASK\_RUNNING (0), [TASK\_INTERRUPTIBLE (1)](/man/enterprise-packages/systemtap/TASK_INTERRUPTIBLE.1), [TASK\_UNINTERRUPTIBLE (2)](/man/enterprise-packages/systemtap/TASK_UNINTERRUPTIBLE.2), [TASK\_STOPPED (4)](/man/enterprise-packages/systemtap/TASK_STOPPED.4), [TASK\_TRACED (8)](/man/enterprise-packages/systemtap/TASK_TRACED.8), EXIT\_ZOMBIE (16), or EXIT\_DEAD (32).

# [SEE ALSO0](#SEE_ALSO0)

[*tapset::task*(3stap)](/man/enterprise-packages/systemtap/tapset::task.3stap)

September 2026 SystemTap Tapset Reference Ver

---

Document: function::task_state(3stap) from systemtap 5.6-r1 (Chainguard OS)
Source: https://sourceware.org/git/systemtap.git
