Skip to content

Commit

Permalink
COMMON: Fix comparison operation on coroutine wait methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 25, 2012
1 parent beef27f commit 4719fd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/coroutines.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio
*expired = true; *expired = true;


// Outer loop for doing checks until expiry // Outer loop for doing checks until expiry
while (g_system->getMillis() < _ctx->endTime) { while (g_system->getMillis() <= _ctx->endTime) {
// Check to see if a process or event with the given Id exists // Check to see if a process or event with the given Id exists
_ctx->pProcess = getProcess(pid); _ctx->pProcess = getProcess(pid);
_ctx->pEvent = !_ctx->pProcess ? getEvent(pid) : NULL; _ctx->pEvent = !_ctx->pProcess ? getEvent(pid) : NULL;
Expand Down Expand Up @@ -456,7 +456,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *
*expired = true; *expired = true;


// Outer loop for doing checks until expiry // Outer loop for doing checks until expiry
while (g_system->getMillis() < _ctx->endTime) { while (g_system->getMillis() <= _ctx->endTime) {
_ctx->signalled = bWaitAll; _ctx->signalled = bWaitAll;


for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) { for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) {
Expand Down

0 comments on commit 4719fd9

Please sign in to comment.