Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions event_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down
6 changes: 6 additions & 0 deletions include/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,12 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp ) PRIVILEGED_FUNCTION;
* SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES
*----------------------------------------------------------*/

#if ( configNUMBER_OF_CORES == 1 )
#define taskYIELD_WITHIN_API() portYIELD_WITHIN_API()
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
#define taskYIELD_WITHIN_API() vTaskYieldWithinAPI()
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */

/*
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY
* INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS
Expand Down
40 changes: 4 additions & 36 deletions queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down
32 changes: 4 additions & 28 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down
10 changes: 1 addition & 9 deletions timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,15 +771,7 @@
* block time to expire. If a command arrived between the
* critical section being exited and this yield then the yield
* will not cause the task to block. */
#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
{
Expand Down