Update to allow use with the cooperative scheduler.

This commit is contained in:
Richard Barry 2008-01-27 20:25:36 +00:00
parent 2ee98beba2
commit e018422743
5 changed files with 50 additions and 2 deletions

View file

@ -159,6 +159,10 @@ unsigned portBASE_TYPE ux;
( *puxLoopCounter )++;
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/* If the semaphore count is zero then we should not be able to 'take'
the semaphore. */
if( xSemaphoreTake( xSemaphore, countDONT_BLOCK ) == pdPASS )
@ -191,6 +195,10 @@ unsigned portBASE_TYPE ux;
( *puxLoopCounter )++;
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/* If the semaphore count is at its maximum then we should not be able to
'give' the semaphore. */
if( xSemaphoreGive( xSemaphore ) == pdPASS )