Skip to content

Commit

Permalink
A second stab at getting apr_thread_cond_timedwait to work. Someone
Browse files Browse the repository at this point in the history
  else should look at this code, please, and let me know if it follows
  the correct behavior.  It passes the tests, but that presumes the tests
  themselves are sufficient.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64243 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
wrowe committed Dec 31, 2002
1 parent 345f2bd commit 53ddd1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locks/win32/thread_cond.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
while (1) {
res = WaitForSingleObject(cond->mutex, timeout_ms);
if (res != WAIT_OBJECT_0) {
if (res == WAIT_ABANDONED) {
if (res == WAIT_TIMEOUT) {
return APR_TIMEUP;
}
return apr_get_os_error();
Expand All @@ -142,7 +142,7 @@ APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond,
if (res != WAIT_OBJECT_0) {
apr_status_t rv = apr_get_os_error();
ReleaseMutex(cond->mutex);
if (res == WAIT_ABANDONED) {
if (res == WAIT_TIMEOUT) {
rv = APR_TIMEUP;
}
return rv;
Expand Down

0 comments on commit 53ddd1e

Please sign in to comment.