Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchinglee-iot <61685396+chinglee-iot@users.noreply.github.com>2023-10-04 12:38:27 +0300
committerGitHub <noreply@github.com>2023-10-04 12:38:27 +0300
commit830533d49e70806b4f46dade245c2f05f0c06b0f (patch)
treef22075d9464ea0a4eecdb015712631060d180391 /tasks.c
parent5cdb1bc4e1ed94468d8e81d6e70bce01a6180fbf (diff)
Add taskYIELD_WITHIN_API macro (#782)
Add taskYIELD_WITHIN_API macro for readability improvement.
Diffstat (limited to 'tasks.c')
-rw-r--r--tasks.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/tasks.c b/tasks.c
index 84bc87bf2..000767bb5 100644
--- a/tasks.c
+++ b/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
{