Skip to content

Commit

Permalink
Don't invoke notify builtin in single-threaded mode
Browse files Browse the repository at this point in the history
This fixes compatibility with old versions of clang
  • Loading branch information
ArcaneNibble committed Aug 6, 2024
1 parent 38081ab commit f47ff55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-top-half/musl/src/internal/pthread_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ static inline void __wake(volatile void *addr, int cnt, int priv)
__syscall(SYS_futex, addr, FUTEX_WAKE|priv, cnt) != -ENOSYS ||
__syscall(SYS_futex, addr, FUTEX_WAKE, cnt);
#else
#ifdef _REENTRANT
__builtin_wasm_memory_atomic_notify((int*)addr, cnt);
#endif
#endif
}
static inline void __futexwait(volatile void *addr, int val, int priv)
{
Expand Down

0 comments on commit f47ff55

Please sign in to comment.