---
name: "function::pid2task"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::pid2task"
---

# function::pid2task(3stap)

The task\_struct of the given process identifier

## NAME

function::pid2task - The task\_struct of the given process identifier

## SYNOPSIS

```
    pid2task:long(pid:long)
```

## ARGUMENTS

*pid*

process identifier

## DESCRIPTION

Return the task struct of the given process id.

## SEE ALSO0

[*tapset::task*(3stap)](/tapset::task/3stap.md)
