Skip to content

Commit

Permalink
Get Windows COND_TIMED_WAIT closer to POSIX semantics
Browse files Browse the repository at this point in the history
The other part of the solution to the Windows timer problem
  • Loading branch information
niner committed Jun 1, 2012
1 parent 58d737e commit 4f8359f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/parrot/thr_windows.h
Expand Up @@ -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) \
Expand Down

0 comments on commit 4f8359f

Please sign in to comment.