Skip to content

Commit ae48454

Browse files
committed
Use taskYIELD_WITHIN_API in all files
1 parent 3884ce6 commit ae48454

File tree

5 files changed

+13
-31
lines changed

5 files changed

+13
-31
lines changed

event_groups.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@
4646
* correct privileged Vs unprivileged linkage and placement. */
4747
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750 !e9021 See comment above. */
4848

49-
#if ( configNUMBER_OF_CORES == 1 )
50-
#define eventgroupYIELD_WITHIN_API() portYIELD_WITHIN_API()
51-
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
52-
#define eventgroupYIELD_WITHIN_API() vTaskYieldWithinAPI()
53-
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
54-
5549
typedef struct EventGroupDef_t
5650
{
5751
EventBits_t uxEventBits;
@@ -249,7 +243,7 @@ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
249243
{
250244
if( xAlreadyYielded == pdFALSE )
251245
{
252-
eventgroupYIELD_WITHIN_API();
246+
taskYIELD_WITHIN_API();
253247
}
254248
else
255249
{
@@ -401,7 +395,7 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
401395
{
402396
if( xAlreadyYielded == pdFALSE )
403397
{
404-
eventgroupYIELD_WITHIN_API();
398+
taskYIELD_WITHIN_API();
405399
}
406400
else
407401
{

include/task.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,6 +3206,12 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp ) PRIVILEGED_FUNCTION;
32063206
* SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES
32073207
*----------------------------------------------------------*/
32083208

3209+
#if ( configNUMBER_OF_CORES == 1 )
3210+
#define taskYIELD_WITHIN_API() portYIELD_WITHIN_API()
3211+
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
3212+
#define taskYIELD_WITHIN_API() vTaskYieldWithinAPI()
3213+
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
3214+
32093215
/*
32103216
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS ONLY
32113217
* INTENDED FOR USE WHEN IMPLEMENTING A PORT OF THE SCHEDULER AND IS

queue.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ typedef struct SemaphoreData
9696
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
9797
#endif
9898

99-
#if ( configNUMBER_OF_CORES == 1 )
100-
#define queueYIELD_WITHIN_API() portYIELD_WITHIN_API()
101-
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
102-
#define queueYIELD_WITHIN_API() vTaskYieldWithinAPI()
103-
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
104-
10599
/*
106100
* Definition of the queue used by the scheduler.
107101
* Items are queued by copy, not reference. See the following link for the
@@ -1080,7 +1074,7 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
10801074
* is also a higher priority task in the pending ready list. */
10811075
if( xTaskResumeAll() == pdFALSE )
10821076
{
1083-
queueYIELD_WITHIN_API();
1077+
taskYIELD_WITHIN_API();
10841078
}
10851079
}
10861080
else
@@ -1541,7 +1535,7 @@ BaseType_t xQueueReceive( QueueHandle_t xQueue,
15411535

15421536
if( xTaskResumeAll() == pdFALSE )
15431537
{
1544-
queueYIELD_WITHIN_API();
1538+
taskYIELD_WITHIN_API();
15451539
}
15461540
else
15471541
{
@@ -1724,7 +1718,7 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue,
17241718

17251719
if( xTaskResumeAll() == pdFALSE )
17261720
{
1727-
queueYIELD_WITHIN_API();
1721+
taskYIELD_WITHIN_API();
17281722
}
17291723
else
17301724
{
@@ -1902,7 +1896,7 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
19021896

19031897
if( xTaskResumeAll() == pdFALSE )
19041898
{
1905-
queueYIELD_WITHIN_API();
1899+
taskYIELD_WITHIN_API();
19061900
}
19071901
else
19081902
{

tasks.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@
6969
#endif
7070
#endif /* if ( configNUMBER_OF_CORES == 1 ) */
7171

72-
#if ( configNUMBER_OF_CORES == 1 )
73-
#define taskYIELD_WITHIN_API() portYIELD_WITHIN_API()
74-
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
75-
#define taskYIELD_WITHIN_API() vTaskYieldWithinAPI()
76-
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
77-
7872
/* Values that can be assigned to the ucNotifyState member of the TCB. */
7973
#define taskNOT_WAITING_NOTIFICATION ( ( uint8_t ) 0 ) /* Must be zero as it is the initialised value. */
8074
#define taskWAITING_NOTIFICATION ( ( uint8_t ) 1 )

timers.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@
7171
#define tmrSTATUS_IS_STATICALLY_ALLOCATED ( 0x02U )
7272
#define tmrSTATUS_IS_AUTORELOAD ( 0x04U )
7373

74-
#if ( configNUMBER_OF_CORES == 1 )
75-
#define timerYIELD_WITHIN_API() portYIELD_WITHIN_API()
76-
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
77-
#define timerYIELD_WITHIN_API() vTaskYieldWithinAPI()
78-
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
79-
8074
/* The definition of the timers themselves. */
8175
typedef struct tmrTimerControl /* The old naming convention is used to prevent breaking kernel aware debuggers. */
8276
{
@@ -716,7 +710,7 @@
716710
* block time to expire. If a command arrived between the
717711
* critical section being exited and this yield then the yield
718712
* will not cause the task to block. */
719-
timerYIELD_WITHIN_API();
713+
taskYIELD_WITHIN_API();
720714
}
721715
else
722716
{

0 commit comments

Comments
 (0)