mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -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
40
queue.c
40
queue.c
|
@ -1129,15 +1129,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
|
|||
* is also a higher priority task in the pending ready list. */
|
||||
if( xTaskResumeAll() == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1616,15 +1608,7 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
|
|||
|
||||
if( xTaskResumeAll() == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1817,15 +1801,7 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
|
|||
|
||||
if( xTaskResumeAll() == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2013,15 +1989,7 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
|
|||
|
||||
if( xTaskResumeAll() == pdFALSE )
|
||||
{
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
{
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
{
|
||||
vTaskYieldWithinAPI();
|
||||
}
|
||||
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||
taskYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue