diff options
Diffstat (limited to 'src/windows.c')
-rw-r--r-- | src/windows.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/windows.c b/src/windows.c index 19e534f..c9b88f7 100644 --- a/src/windows.c +++ b/src/windows.c @@ -35,8 +35,7 @@ static void wait_worker_threads(struct pthreadpool* threadpool, uint32_t event_i /* Spin-wait */ for (uint32_t i = PTHREADPOOL_SPIN_WAIT_ITERATIONS; i != 0; i--) { - /* This fence serves as a sleep instruction */ - pthreadpool_fence_acquire(); + pthreadpool_yield(); active_threads = pthreadpool_load_acquire_size_t(&threadpool->active_threads); if (active_threads == 0) { @@ -63,8 +62,7 @@ static uint32_t wait_for_new_command( if ((last_flags & PTHREADPOOL_FLAG_YIELD_WORKERS) == 0) { /* Spin-wait loop */ for (uint32_t i = PTHREADPOOL_SPIN_WAIT_ITERATIONS; i != 0; i--) { - /* This fence serves as a sleep instruction */ - pthreadpool_fence_acquire(); + pthreadpool_yield(); command = pthreadpool_load_acquire_uint32_t(&threadpool->command); if (command != last_command) { |