---
name: "SDL_GetCurrentThreadID"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetCurrentThreadID"
---

# SDL\_GetCurrentThreadID(3)

Get the thread identifier for the current thread.

## NAME

SDL\_GetCurrentThreadID - Get the thread identifier for the current thread.

## HEADER FILE

Defined in SDL3/SDL\_thread.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_ThreadID SDL\_GetCurrentThreadID(void);**

## DESCRIPTION

This thread identifier is as reported by the underlying operating system. If SDL is running on a platform that does not support threads the return value will always be zero.

This function also returns a valid thread ID when called from the main thread.

## RETURN VALUE

( **SDL\_ThreadID** ) Returns the ID of the current thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetThreadID**(3)](/SDL_GetThreadID/3.md)
