Skip to content

Commit bb8317a

Browse files
committed
Fix a bunch of RecursiveMutex code using plain mutex types.
1 parent 21aeead commit bb8317a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/swift/Threading/Impl/Linux.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,22 @@ inline void lazy_mutex_unsafe_unlock(lazy_mutex_handle &handle) {
138138

139139
using recursive_mutex_handle = ::pthread_mutex_t;
140140

141-
inline void recursive_mutex_init(mutex_handle &handle, bool checked = false) {
141+
inline void recursive_mutex_init(recursive_mutex_handle &handle, bool checked = false) {
142142
::pthread_mutexattr_t attr;
143143
SWIFT_LINUXTHREADS_CHECK(::pthread_mutexattr_init(&attr));
144144
SWIFT_LINUXTHREADS_CHECK(
145145
::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
146146
SWIFT_LINUXTHREADS_CHECK(::pthread_mutex_init(&handle, &attr));
147147
SWIFT_LINUXTHREADS_CHECK(::pthread_mutexattr_destroy(&attr));
148148
}
149-
inline void recursive_mutex_destroy(mutex_handle &handle) {
149+
inline void recursive_mutex_destroy(recursive_mutex_handle &handle) {
150150
SWIFT_LINUXTHREADS_CHECK(::pthread_mutex_destroy(&handle));
151151
}
152152

153-
inline void recursive_mutex_lock(mutex_handle &handle) {
153+
inline void recursive_mutex_lock(recursive_mutex_handle &handle) {
154154
SWIFT_LINUXTHREADS_CHECK(::pthread_mutex_lock(&handle));
155155
}
156-
inline void recursive_mutex_unlock(mutex_handle &handle) {
156+
inline void recursive_mutex_unlock(recursive_mutex_handle &handle) {
157157
SWIFT_LINUXTHREADS_CHECK(::pthread_mutex_unlock(&handle));
158158
}
159159

include/swift/Threading/Impl/Pthreads.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,22 @@ inline void lazy_mutex_unsafe_unlock(lazy_mutex_handle &handle) {
134134

135135
using recursive_mutex_handle = ::pthread_mutex_t;
136136

137-
inline void recursive_mutex_init(mutex_handle &handle, bool checked = false) {
137+
inline void recursive_mutex_init(recursive_mutex_handle &handle, bool checked = false) {
138138
::pthread_mutexattr_t attr;
139139
SWIFT_PTHREADS_CHECK(::pthread_mutexattr_init(&attr));
140140
SWIFT_PTHREADS_CHECK(
141141
::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
142142
SWIFT_PTHREADS_CHECK(::pthread_mutex_init(&handle, &attr));
143143
SWIFT_PTHREADS_CHECK(::pthread_mutexattr_destroy(&attr));
144144
}
145-
inline void recursive_mutex_destroy(mutex_handle &handle) {
145+
inline void recursive_mutex_destroy(recursive_mutex_handle &handle) {
146146
SWIFT_PTHREADS_CHECK(::pthread_mutex_destroy(&handle));
147147
}
148148

149-
inline void recursive_mutex_lock(mutex_handle &handle) {
149+
inline void recursive_mutex_lock(recursive_mutex_handle &handle) {
150150
SWIFT_PTHREADS_CHECK(::pthread_mutex_lock(&handle));
151151
}
152-
inline void recursive_mutex_unlock(mutex_handle &handle) {
152+
inline void recursive_mutex_unlock(recursive_mutex_handle &handle) {
153153
SWIFT_PTHREADS_CHECK(::pthread_mutex_unlock(&handle));
154154
}
155155

include/swift/Threading/Mutex.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ using SmallMutex =
244244
/// A recursive variant of Mutex.
245245
class RecursiveMutex {
246246

247-
RecursiveMutex(const Mutex &) = delete;
248-
RecursiveMutex &operator=(const Mutex &) = delete;
249-
RecursiveMutex(Mutex &&) = delete;
250-
RecursiveMutex &operator=(Mutex &&) = delete;
247+
RecursiveMutex(const RecursiveMutex &) = delete;
248+
RecursiveMutex &operator=(const RecursiveMutex &) = delete;
249+
RecursiveMutex(RecursiveMutex &&) = delete;
250+
RecursiveMutex &operator=(RecursiveMutex &&) = delete;
251251

252252
public:
253253
/// Constructs a non-recursive mutex.

0 commit comments

Comments
 (0)