[mutex.syn]

# 32 Concurrency support library [[thread]](./#thread)

## 32.6 Mutual exclusion [[thread.mutex]](thread.mutex#mutex.syn)

### 32.6.2 Header <mutex> synopsis [mutex.syn]

[ð](#header:%3cmutex%3e)

namespace std {// [[thread.mutex.class]](thread.mutex.class "32.6.4.2.2 Class mutex"), class mutexclass mutex; // [[thread.mutex.recursive]](thread.mutex.recursive "32.6.4.2.3 Class recursive_­mutex"), class recursive_mutexclass recursive_mutex; // [[thread.timedmutex.class]](thread.timedmutex.class "32.6.4.3.2 Class timed_­mutex"), class timed_mutexclass timed_mutex; // [[thread.timedmutex.recursive]](thread.timedmutex.recursive "32.6.4.3.3 Class recursive_­timed_­mutex"), class recursive_timed_mutexclass recursive_timed_mutex; struct defer_lock_t { explicit defer_lock_t() = default; }; struct try_to_lock_t { explicit try_to_lock_t() = default; }; struct adopt_lock_t { explicit adopt_lock_t() = default; }; inline constexpr defer_lock_t defer_lock { }; inline constexpr try_to_lock_t try_to_lock { }; inline constexpr adopt_lock_t adopt_lock { }; // [[thread.lock]](thread.lock "32.6.5 Locks"), lockstemplate<class Mutex> class lock_guard; template<class... MutexTypes> class scoped_lock; template<class Mutex> class unique_lock; template<class Mutex>void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept; // [[thread.lock.algorithm]](thread.lock.algorithm "32.6.6 Generic locking algorithms"), generic locking algorithmstemplate<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...); template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...); struct once_flag; template<class Callable, class... Args>void call_once(once_flag& flag, Callable&& func, Args&&... args);}
