@@ -35,31 +35,31 @@ inline bool threads_same(thread_id a, thread_id b) { return a == b; }
35
35
36
36
// .. Mutex support ..........................................................
37
37
38
- using mutex_handle = ::SRWLOCK ;
38
+ using mutex_handle = SWIFT_SRWLOCK ;
39
39
40
40
inline void mutex_init (mutex_handle &handle, bool checked=false ) {
41
41
handle = SRWLOCK_INIT;
42
42
}
43
43
inline void mutex_destroy (mutex_handle &handle) { }
44
44
45
45
inline void mutex_lock (mutex_handle &handle) {
46
- :: AcquireSRWLockExclusive (&handle);
46
+ AcquireSRWLockExclusive (&handle);
47
47
}
48
48
inline void mutex_unlock (mutex_handle &handle) {
49
- :: ReleaseSRWLockExclusive (&handle);
49
+ ReleaseSRWLockExclusive (&handle);
50
50
}
51
51
inline bool mutex_try_lock (mutex_handle &handle) {
52
- return !!:: TryAcquireSRWLockExclusive (&handle);
52
+ return !!TryAcquireSRWLockExclusive (&handle);
53
53
}
54
54
55
55
inline void mutex_unsafe_lock (mutex_handle &handle) {
56
- :: AcquireSRWLockExclusive (&handle);
56
+ AcquireSRWLockExclusive (&handle);
57
57
}
58
58
inline void mutex_unsafe_unlock (mutex_handle &handle) {
59
- :: ReleaseSRWLockExclusive (&handle);
59
+ ReleaseSRWLockExclusive (&handle);
60
60
}
61
61
62
- using lazy_mutex_handle = ::SRWLOCK ;
62
+ using lazy_mutex_handle = SWIFT_SRWLOCK ;
63
63
64
64
// We don't need to be lazy here because Win32 has SRWLOCK_INIT.
65
65
inline constexpr lazy_mutex_handle lazy_mutex_initializer () {
@@ -68,20 +68,20 @@ inline constexpr lazy_mutex_handle lazy_mutex_initializer() {
68
68
inline void lazy_mutex_destroy (lazy_mutex_handle &handle) { }
69
69
70
70
inline void lazy_mutex_lock (lazy_mutex_handle &handle) {
71
- :: AcquireSRWLockExclusive (&handle);
71
+ AcquireSRWLockExclusive (&handle);
72
72
}
73
73
inline void lazy_mutex_unlock (lazy_mutex_handle &handle) {
74
- :: ReleaseSRWLockExclusive (&handle);
74
+ ReleaseSRWLockExclusive (&handle);
75
75
}
76
76
inline bool lazy_mutex_try_lock (lazy_mutex_handle &handle) {
77
- return !!:: TryAcquireSRWLockExclusive (&handle);
77
+ return !!TryAcquireSRWLockExclusive (&handle);
78
78
}
79
79
80
80
inline void lazy_mutex_unsafe_lock (lazy_mutex_handle &handle) {
81
- :: AcquireSRWLockExclusive (&handle);
81
+ AcquireSRWLockExclusive (&handle);
82
82
}
83
83
inline void lazy_mutex_unsafe_unlock (lazy_mutex_handle &handle) {
84
- :: ReleaseSRWLockExclusive (&handle);
84
+ ReleaseSRWLockExclusive (&handle);
85
85
}
86
86
87
87
// .. Once ...................................................................
0 commit comments