mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Runtime] Define WebAssembly/WASI MutexPThread macros as 0
This commit is contained in:
@@ -26,12 +26,12 @@ typedef pthread_cond_t ConditionHandle;
|
||||
typedef pthread_mutex_t MutexHandle;
|
||||
typedef pthread_rwlock_t ReadWriteLockHandle;
|
||||
|
||||
#if defined(__CYGWIN__) || defined(__ANDROID__) || defined(__HAIKU__)
|
||||
#if defined(__CYGWIN__) || defined(__ANDROID__) || defined(__HAIKU__) || defined(__wasi__)
|
||||
// At the moment CYGWIN pthreads implementation doesn't support the use of
|
||||
// constexpr for static allocation versions. The way they define things
|
||||
// results in a reinterpret_cast which violates constexpr. Similarly, Android's
|
||||
// pthread implementation makes use of volatile attributes that prevent it from
|
||||
// being marked as constexpr.
|
||||
// being marked as constexpr. WASI currently doesn't support threading/locking at all.
|
||||
#define SWIFT_CONDITION_SUPPORTS_CONSTEXPR 0
|
||||
#define SWIFT_MUTEX_SUPPORTS_CONSTEXPR 0
|
||||
#define SWIFT_READWRITELOCK_SUPPORTS_CONSTEXPR 0
|
||||
|
||||
Reference in New Issue
Block a user