mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Add taskYIELD_WITHIN_API macro (#782)
Add taskYIELD_WITHIN_API macro for readability improvement.
This commit is contained in:
parent
5cdb1bc4e1
commit
830533d49e
5 changed files with 17 additions and 91 deletions
32
tasks.c
32
tasks.c
|
@ -2195,11 +2195,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
* have put ourselves to sleep. */
|
||||
if( xAlreadyYielded == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
portYIELD_WITHIN_API();
|
||||
#else
|
||||
vTaskYieldWithinAPI();
|
||||
#endif
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2251,11 +2247,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
* have put ourselves to sleep. */
|
||||
if( xAlreadyYielded == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
portYIELD_WITHIN_API();
|
||||
#else
|
||||
vTaskYieldWithinAPI();
|
||||
#endif
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7253,15 +7245,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
|||
* section (some will yield immediately, others wait until the
|
||||
* critical section exits) - but it is not something that
|
||||
* application code should ever do. */
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7344,15 +7328,7 @@ TickType_t uxTaskResetEventItemValue( void )
|
|||
* section (some will yield immediately, others wait until the
|
||||
* critical section exits) - but it is not something that
|
||||
* application code should ever do. */
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue