POSIX Simulator: Assert if vPortYield called from a non-FreeRTOS thread (#1247)

This commit is contained in:
John Boiles 2025-02-12 21:14:22 -08:00 committed by GitHub
parent 29e817b70e
commit 15ec8b8995
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,6 +384,10 @@ static void prvPortYieldFromISR( void )
void vPortYield( void ) void vPortYield( void )
{ {
/* This must never be called from outside of a FreeRTOS-owned thread, or
* the thread could get stuck in a suspended state. */
configASSERT( prvIsFreeRTOSThread() == pdTRUE );
vPortEnterCritical(); vPortEnterCritical();
prvPortYieldFromISR(); prvPortYieldFromISR();