From Jason Turner

[mutex.syn]

Diff to HTML by rtfpessoa

tmp/tmplk8y2blh/{from.md → to.md} RENAMED
@@ -1,29 +1,35 @@
1
  ### Header `<mutex>` synopsis <a id="mutex.syn">[[mutex.syn]]</a>
2
 
3
  ``` cpp
4
  namespace std {
 
5
  class mutex;
 
6
  class recursive_mutex;
 
7
  class timed_mutex;
 
8
  class recursive_timed_mutex;
9
 
10
  struct defer_lock_t { explicit defer_lock_t() = default; };
11
  struct try_to_lock_t { explicit try_to_lock_t() = default; };
12
  struct adopt_lock_t { explicit adopt_lock_t() = default; };
13
 
14
  inline constexpr defer_lock_t defer_lock { };
15
  inline constexpr try_to_lock_t try_to_lock { };
16
  inline constexpr adopt_lock_t adopt_lock { };
17
 
 
18
  template<class Mutex> class lock_guard;
19
  template<class... MutexTypes> class scoped_lock;
20
  template<class Mutex> class unique_lock;
21
 
22
  template<class Mutex>
23
  void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;
24
 
 
25
  template<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...);
26
  template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...);
27
 
28
  struct once_flag;
29
 
 
1
  ### Header `<mutex>` synopsis <a id="mutex.syn">[[mutex.syn]]</a>
2
 
3
  ``` cpp
4
  namespace std {
5
+ // [thread.mutex.class], class mutex
6
  class mutex;
7
+ // [thread.mutex.recursive], class recursive_mutex
8
  class recursive_mutex;
9
+ // [thread.timedmutex.class] class timed_mutex
10
  class timed_mutex;
11
+ // [thread.timedmutex.recursive], class recursive_timed_mutex
12
  class recursive_timed_mutex;
13
 
14
  struct defer_lock_t { explicit defer_lock_t() = default; };
15
  struct try_to_lock_t { explicit try_to_lock_t() = default; };
16
  struct adopt_lock_t { explicit adopt_lock_t() = default; };
17
 
18
  inline constexpr defer_lock_t defer_lock { };
19
  inline constexpr try_to_lock_t try_to_lock { };
20
  inline constexpr adopt_lock_t adopt_lock { };
21
 
22
+ // [thread.lock], locks
23
  template<class Mutex> class lock_guard;
24
  template<class... MutexTypes> class scoped_lock;
25
  template<class Mutex> class unique_lock;
26
 
27
  template<class Mutex>
28
  void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y) noexcept;
29
 
30
+ // [thread.lock.algorithm], generic locking algorithms
31
  template<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...);
32
  template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...);
33
 
34
  struct once_flag;
35