Skip to content

Commit bfa9923

Browse files
committed
Update comment when deleting a running task
1 parent 45241c9 commit bfa9923

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tasks.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,11 +1923,12 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
19231923
* no longer running. */
19241924
if( taskTASK_IS_RUNNING_OR_YIELDING( pxTCB ) != pdFALSE )
19251925
{
1926-
/* A running task is being deleted. This cannot complete within the
1927-
* task itself, as a context switch to another task is required.
1928-
* Place the task in the termination list. The idle task will
1929-
* check the termination list and free up any memory allocated by
1930-
* the scheduler for the TCB and stack of the deleted task. */
1926+
/* A running or yielding task is being deleted. This cannot complete
1927+
* when the task is still running on core, as a context switch to
1928+
* another task is required. Place the task in the termination list.
1929+
* The idle task will check the termination list and free up any
1930+
* memory allocated by the scheduler for the TCB and stack of the
1931+
* deleted task. */
19311932
vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xStateListItem ) );
19321933

19331934
/* Increment the ucTasksDeleted variable so the idle task knows

0 commit comments

Comments
 (0)