# thrd_current

> C++ Atlas: `cppatlas.com/w/c/thread/thrd_current` | Source: https://en.cppreference.com/w/c/thread/thrd_current | Domain: Concurrency support | Standards: C11

Returns the identifier of the calling thread.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <threads.h>
thrd_t thrd_current( void ); // (since C11)
```

Returns the identifier of the calling thread.

### Parameters

(none)

### Return value

The identifier of the calling thread.

### References

- C17 standard (ISO/IEC 9899:2018):

  - 7.26.5.2 The thrd_current function (p: 279)

- C11 standard (ISO/IEC 9899:2011):

  - 7.26.5.2 The thrd_current function (p: 383)

### See also

- [C++ documentation for `get_id`](https://en.cppreference.com/w/cpp/thread/get_id)

---
Attribution: content from https://en.cppreference.com/w/c/thread/thrd_current (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.