Skip to content

Update comments related to portYIELD_FROM_ISR() #925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 15, 2023
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
23 changes: 16 additions & 7 deletions include/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -1185,9 +1185,12 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
* {
* // Writing to the queue caused a task to unblock and the unblocked task
* // has a priority higher than or equal to the priority of the currently
* // executing task (the task this interrupt interrupted). Perform a context
* // executing task (the task this interrupt interrupted). Perform a context
* // switch so this interrupt returns directly to the unblocked task.
* portYIELD_FROM_ISR(); // or portEND_SWITCHING_ISR() depending on the port.
* // The macro used is port specific and will be either
* // portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() - refer to the documentation
* // page for the port being used.
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
* }
* }
* @endcode
Expand Down Expand Up @@ -1260,8 +1263,11 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
* // Now the buffer is empty we can switch context if necessary.
* if( xHigherPriorityTaskWoken )
* {
* // Actual macro used here is port specific.
* portYIELD_FROM_ISR ();
* // As xHigherPriorityTaskWoken is now set to pdTRUE then a context
* // switch should be requested. The macro used is port specific and
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
* // refer to the documentation page for the port being used.
* portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
* }
* }
* @endcode
Expand Down Expand Up @@ -1337,11 +1343,14 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
*
* } while( portINPUT_BYTE( BUFFER_COUNT ) );
*
* // Now the buffer is empty we can switch context if necessary. Note that the
* // name of the yield function required is port specific.
* // Now the buffer is empty we can switch context if necessary.
* if( xHigherPriorityTaskWokenByPost )
* {
* portYIELD_FROM_ISR();
* // As xHigherPriorityTaskWokenByPost is now set to pdTRUE then a context
* // switch should be requested. The macro used is port specific and
* // will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
* // refer to the documentation page for the port being used.
* portYIELD_FROM_ISR( xHigherPriorityTaskWokenByPost );
* }
* }
* @endcode
Expand Down
2 changes: 1 addition & 1 deletion tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3463,7 +3463,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,

/* Mark that a yield is pending in case the user is not
* using the return value to initiate a context switch
* from the ISR using portYIELD_FROM_ISR. */
* from the ISR using the port specific portYIELD_FROM_ISR(). */
xYieldPendings[ 0 ] = pdTRUE;
}
else
Expand Down