---
name: "std::mutex.h"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::mutex.h"
---

# std::mutex.h(3cxx)

## NAME

std\_mutex.h

## SYNOPSIS

### Classes

struct **std::adopt\_lock\_t**\
 Assume the calling thread has already obtained mutex ownership and manage it.  struct **std::defer\_lock\_t**\
 Do not acquire ownership of the mutex.  class **std::lock\_guard\< \_Mutex \>**\
 A simple scoped lock type.  class **std::mutex**\
 struct **std::try\_to\_lock\_t**\
 Try to acquire ownership of the mutex without blocking.

### Namespaces

namespace **std**\
 ISO C++ entities toplevel namespace is std.

### Variables

constexpr **adopt\_lock\_t** **std::adopt\_lock**\
 Tag used to make a scoped lock take ownership of a locked mutex.  constexpr **defer\_lock\_t** **std::defer\_lock**\
 Tag used to prevent a scoped lock from acquiring ownership of a mutex.  constexpr **try\_to\_lock\_t** **std::try\_to\_lock**\
 Tag used to prevent a scoped lock from blocking if a mutex is locked.

## Detailed Description

This is an internal header file, included by other library headers. Do not attempt to use it directly. Instead, include \<mutex\>.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
