File tree 1 file changed +16
-0
lines changed
CoreFoundation/Base.subproj
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,22 @@ typedef CFLock_t OSSpinLock;
96
96
#define OSSpinLockLock (lock ) __CFLock(lock)
97
97
#define OSSpinLockUnlock (lock ) __CFUnlock(lock)
98
98
99
+ #elif TARGET_OS_WASI
100
+
101
+ // Empty shims until https://bugs.swift.org/browse/SR-12097 is resolved.
102
+ typedef int32_t CFLock_t ;
103
+ typedef CFLock_t OSSpinLock ;
104
+ #define CFLockInit 0
105
+ #define CF_LOCK_INIT_FOR_STRUCTS (X ) (X = CFLockInit)
106
+ #define OS_SPINLOCK_INIT CFLockInit
107
+
108
+ #define OSSpinLockLock (lock ) __CFLock(lock)
109
+ #define OSSpinLockUnlock (lock ) __CFUnlock(lock)
110
+ #define __CFLock (A ) do {} while (0)
111
+ #define __CFUnlock (A ) do {} while (0)
112
+
113
+ static inline CFLock_t __CFLockInit (void ) { return CFLockInit ; }
114
+
99
115
#else
100
116
101
117
#warning CF locks not defined for this platform -- CF is not thread-safe
You can’t perform that action at this time.
0 commit comments