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

@ -157,6 +157,12 @@ portTickType xTimeToBlock, xBlockedTime;
}
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/*********************************************************************
Test 2
@ -208,6 +214,10 @@ portTickType xTimeToBlock, xBlockedTime;
}
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/*********************************************************************
Test 3
@ -283,6 +293,9 @@ portTickType xTimeToBlock, xBlockedTime;
vTaskDelay( bktSHORT_WAIT );
xRunIndicator = 0;
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/*********************************************************************
Test 4

View file

@ -146,6 +146,10 @@ portTickType xTimeToBlock, xBlockedTime;
}
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/*********************************************************************
Test 2
@ -197,6 +201,9 @@ portTickType xTimeToBlock, xBlockedTime;
}
}
#if configUSE_PREEMPTION == 0
taskYIELD();
#endif
/*********************************************************************
Test 3

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 )