@ -193,6 +193,8 @@ UBaseType_t ux;
/* We should be able to 'take' the semaphore countMAX_COUNT_VALUE times. */
/* We should be able to 'take' the semaphore countMAX_COUNT_VALUE times. */
for ( ux = 0 ; ux < countMAX_COUNT_VALUE ; ux + + )
for ( ux = 0 ; ux < countMAX_COUNT_VALUE ; ux + + )
{
{
configASSERT ( xSemaphoreGetCount ( xSemaphore ) = = ( countMAX_COUNT_VALUE - ux ) ) ;
if ( xSemaphoreTake ( xSemaphore , countDONT_BLOCK ) ! = pdPASS )
if ( xSemaphoreTake ( xSemaphore , countDONT_BLOCK ) ! = pdPASS )
{
{
/* We expected to be able to take the semaphore. */
/* We expected to be able to take the semaphore. */
@ -208,6 +210,7 @@ UBaseType_t ux;
/* If the semaphore count is zero then we should not be able to 'take'
/* If the semaphore count is zero then we should not be able to 'take'
the semaphore . */
the semaphore . */
configASSERT ( xSemaphoreGetCount ( xSemaphore ) = = 0 ) ;
if ( xSemaphoreTake ( xSemaphore , countDONT_BLOCK ) = = pdPASS )
if ( xSemaphoreTake ( xSemaphore , countDONT_BLOCK ) = = pdPASS )
{
{
xErrorDetected = pdTRUE ;
xErrorDetected = pdTRUE ;
@ -229,6 +232,8 @@ UBaseType_t ux;
/* We should be able to 'give' the semaphore countMAX_COUNT_VALUE times. */
/* We should be able to 'give' the semaphore countMAX_COUNT_VALUE times. */
for ( ux = 0 ; ux < countMAX_COUNT_VALUE ; ux + + )
for ( ux = 0 ; ux < countMAX_COUNT_VALUE ; ux + + )
{
{
configASSERT ( xSemaphoreGetCount ( xSemaphore ) = = ux ) ;
if ( xSemaphoreGive ( xSemaphore ) ! = pdPASS )
if ( xSemaphoreGive ( xSemaphore ) ! = pdPASS )
{
{
/* We expected to be able to take the semaphore. */
/* We expected to be able to take the semaphore. */