Skip to content

Commit f47ff55

Browse files
committed
Don't invoke notify builtin in single-threaded mode
This fixes compatibility with old versions of clang
1 parent 38081ab commit f47ff55

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

Lines changed: 2 additions & 0 deletions
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)