Skip to content

Commit 553b0ad

Browse files
authored
Update comments related to portYIELD_FROM_ISR() in queue.h #925
1 parent 1384c68 commit 553b0ad

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

include/queue.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,9 +1185,12 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
11851185
* {
11861186
* // Writing to the queue caused a task to unblock and the unblocked task
11871187
* // has a priority higher than or equal to the priority of the currently
1188-
* // executing task (the task this interrupt interrupted). Perform a context
1188+
* // executing task (the task this interrupt interrupted). Perform a context
11891189
* // switch so this interrupt returns directly to the unblocked task.
1190-
* portYIELD_FROM_ISR(); // or portEND_SWITCHING_ISR() depending on the port.
1190+
* // The macro used is port specific and will be either
1191+
* // portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to the documentation
1192+
* // page for the port being used.
1193+
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
11911194
* }
11921195
* }
11931196
* @endcode
@@ -1260,8 +1263,11 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
12601263
* // Now the buffer is empty we can switch context if necessary.
12611264
* if( xHigherPriorityTaskWoken )
12621265
* {
1263-
* // Actual macro used here is port specific.
1264-
* portYIELD_FROM_ISR ();
1266+
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
1267+
* // switch should be requested. The macro used is port specific and
1268+
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
1269+
* // refer to the documentation page for the port being used.
1270+
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
12651271
* }
12661272
* }
12671273
* @endcode
@@ -1337,11 +1343,14 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
13371343
*
13381344
* } while( portINPUT_BYTE( BUFFER_COUNT ) );
13391345
*
1340-
* // Now the buffer is empty we can switch context if necessary. Note that the
1341-
* // name of the yield function required is port specific.
1346+
* // Now the buffer is empty we can switch context if necessary.
13421347
* if( xHigherPriorityTaskWokenByPost )
13431348
* {
1344-
* portYIELD_FROM_ISR();
1349+
* // As xHigherPriorityTaskWokenByPost is now set to pdTRUE then a context
1350+
* // switch should be requested. The macro used is port specific and
1351+
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
1352+
* // refer to the documentation page for the port being used.
1353+
* portYIELD_FROM_ISR( xHigherPriorityTaskWokenByPost );
13451354
* }
13461355
* }
13471356
* @endcode

tasks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3463,7 +3463,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
34633463

34643464
/* Mark that a yield is pending in case the user is not
34653465
* using the return value to initiate a context switch
3466-
* from the ISR using portYIELD_FROM_ISR. */
3466+
* from the ISR using the port specific portYIELD_FROM_ISR(). */
34673467
xYieldPendings[ 0 ] = pdTRUE;
34683468
}
34693469
else

0 commit comments

Comments
 (0)