mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Runtime] Fix recursive_mutex_handle when getting os_unfair_recursive_lock from the SDK.
The declaration was inside the #if, which makes it unavailable when the condition is not true. Move the declaration outside the #if. rdar://158956741
This commit is contained in:
@@ -144,8 +144,6 @@ typedef struct os_unfair_recursive_lock_s {
|
||||
uint32_t ourl_count;
|
||||
} os_unfair_recursive_lock, *os_unfair_recursive_lock_t;
|
||||
|
||||
using recursive_mutex_handle = os_unfair_recursive_lock;
|
||||
|
||||
extern "C" void
|
||||
os_unfair_recursive_lock_lock_with_options(os_unfair_recursive_lock_t lock,
|
||||
uint32_t options);
|
||||
@@ -155,6 +153,8 @@ os_unfair_recursive_lock_unlock(os_unfair_recursive_lock_t lock);
|
||||
|
||||
#endif // OS_UNFAIR_RECURSIVE_LOCK_INIT
|
||||
|
||||
using recursive_mutex_handle = os_unfair_recursive_lock;
|
||||
|
||||
inline void recursive_mutex_init(recursive_mutex_handle &handle,
|
||||
bool checked = false) {
|
||||
handle = OS_UNFAIR_RECURSIVE_LOCK_INIT;
|
||||
|
||||
Reference in New Issue
Block a user