Skip to content
Open
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
19 changes: 19 additions & 0 deletions FreeRTOS-Cpp/include/FreeRTOS/Kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,25 @@ inline void yield() {
taskYIELD();
}

/**
* Kernel.hpp
*
* @brief Function that calls <tt>portYIELD_FROM_ISR()</tt> to request a context
* switch from an ISR.
*
* @see <https://www.freertos.org/Why-FreeRTOS/FAQs/ISRs>
*
* This function is intended to be used at the end of an interrupt service
* routine (ISR). It requests a context switch if calling an ISR-safe FreeRTOS
* API function caused a higher-priority task to unblock.
*
* @param higherPriorityTaskWoken Set to true by the ISR-safe API wrapper if a
* higher-priority task was woken and a context switch should be performed.
*/
inline void yieldFromISR(bool higherPriorityTaskWoken) {
portYIELD_FROM_ISR(higherPriorityTaskWoken ? pdTRUE : pdFALSE);
}

/**
* Kernel.hpp
*
Expand Down