| 23 | pthread_t waitingThreads[NUM_THREADS]; |
| 24 | |
| 25 | void *WakingThread(void *arg) { |
| 26 | // Wake all threads waiting for the futex address |
| 27 | emscripten_atomic_store_u32(&futexVal, 1); |
| 28 | emscripten_futex_wake(&futexVal, INT_MAX); |
| 29 | |
| 30 | pthread_exit(0); |
| 31 | } |
| 32 | |
| 33 | void *WaitingThread(void *arg) { |
| 34 | // Last waiting thread creates the waking thread - this simplifies mutual synchronization needs |
nothing calls this directly
no test coverage detected