Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 80e0c80

Browse files
committedAug 6, 2024·
Don't invoke notify builtin in single-threaded mode
This fixes compatibility with old versions of clang
1 parent f849058 commit 80e0c80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎libc-top-half/musl/src/internal/pthread_impl.h

+2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,10 @@ static inline void __wake(volatile void *addr, int cnt, int priv)
186186
__syscall(SYS_futex, addr, FUTEX_WAKE|priv, cnt) != -ENOSYS ||
187187
__syscall(SYS_futex, addr, FUTEX_WAKE, cnt);
188188
#else
189+
#ifdef _REENTRANT
189190
__builtin_wasm_memory_atomic_notify((int*)addr, cnt);
190191
#endif
192+
#endif
191193
}
192194
static inline void __futexwait(volatile void *addr, int val, int priv)
193195
{

0 commit comments

Comments
 (0)
Please sign in to comment.