Add taskYIELD_WITHIN_API macro (#782)

Add taskYIELD_WITHIN_API macro for readability improvement.
This commit is contained in:
chinglee-iot
2023-10-04 17:38:27 +08:00
committed by GitHub
parent 5cdb1bc4e1
commit 830533d49e
5 changed files with 17 additions and 91 deletions

View File

@ -253,15 +253,7 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
{
if( xAlreadyYielded == 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
{
@ -417,15 +409,7 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
{
if( xAlreadyYielded == 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
{