diff --git a/Python/condvar.h b/Python/condvar.h --- a/Python/condvar.h +++ b/Python/condvar.h @@ -1,4 +1,4 @@ -/* +/* * Portable condition variable support for windows and pthreads. * Everything is inline, this header can be included where needed. * @@ -89,7 +89,7 @@ /* return 0 for success, 1 on timeout, -1 on error */ Py_LOCAL_INLINE(int) -PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, long us) +PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, unsigned long us) { int r; struct timespec ts; @@ -105,7 +105,7 @@ return 1; else if (r) return -1; - else + else return 0; } @@ -255,7 +255,7 @@ * a new thread comes along, it will pass right throuhgh, having * adjusted it to (waiting == 0 && sem.count == 0). */ - + if (wait == WAIT_FAILED) return -1; /* return 0 on success, 1 on timeout */ @@ -270,7 +270,7 @@ } Py_LOCAL_INLINE(int) -PyCOND_TIMEDWAIT(PyCOND_T *cv, PyMUTEX_T *cs, long us) +PyCOND_TIMEDWAIT(PyCOND_T *cv, PyMUTEX_T *cs, unsigned long us) { return _PyCOND_WAIT_MS(cv, cs, us/1000); } @@ -363,7 +363,7 @@ * 2 to indicate that we don't know. */ Py_LOCAL_INLINE(int) -PyCOND_TIMEDWAIT(PyCOND_T *cv, PyMUTEX_T *cs, long us) +PyCOND_TIMEDWAIT(PyCOND_T *cv, PyMUTEX_T *cs, unsigned long us) { return SleepConditionVariableSRW(cv, cs, us/1000, 0) ? 2 : -1; }