diff --git a/include/parrot/thr_windows.h b/include/parrot/thr_windows.h index fa98d7ba7e..fce2a6b658 100644 --- a/include/parrot/thr_windows.h +++ b/include/parrot/thr_windows.h @@ -62,10 +62,13 @@ typedef HANDLE Parrot_thread; ++(c).m_lWaiters; \ UNLOCK(m); \ diff = (DWORD)(((t)->tv_sec - sec)*1000L + ((t)->tv_nsec - nsec)/1000000L); \ - (rc) |= WaitForSingleObject((c).m_hSema, diff); \ + (rc) = WaitForSingleObject((c).m_hSema, diff) != WAIT_OBJECT_0; \ LOCK(m); \ --(c).m_lWaiters; \ } \ + else { \ + (rc) = 1; \ + } \ } while (0) # define COND_SIGNAL(c) \