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

# function::speculation(3stap)

Allocate a new id for speculative output

## NAME

function::speculation - Allocate a new id for speculative output

## SYNOPSIS

```
    speculation:long()
```

## ARGUMENTS

None

## DESCRIPTION

The **speculation** function is called when a new speculation buffer is needed. It returns an id for the speculative output. There can be multiple threads being speculated on concurrently. This id is used by other speculation functions to keep the threads separate.

## SEE ALSO0

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