diff --git a/.github/workflows/kernel-checks.yml b/.github/workflows/kernel-checks.yml index b23b38f94d9..3fca2e0ecf1 100644 --- a/.github/workflows/kernel-checks.yml +++ b/.github/workflows/kernel-checks.yml @@ -11,7 +11,7 @@ jobs: - name: Tool Setup uses: actions/setup-python@v2 with: - python-version: 3.7.10 + python-version: 3.11.0 architecture: x64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/tasks.c b/tasks.c index 046aed9aace..d74561ff535 100644 --- a/tasks.c +++ b/tasks.c @@ -938,7 +938,9 @@ static void prvYieldForTask( TCB_t * pxTCB, { if( xDecrementTopPriority != pdFALSE ) { - uxTopReadyPriority--; + if(uxTopReadyPriority > 0) { + uxTopReadyPriority--; + } #if ( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configNUM_CORES > 1 ) ) { xPriorityDropped = pdTRUE; @@ -956,7 +958,9 @@ static void prvYieldForTask( TCB_t * pxTCB, } configASSERT( ( uxCurrentPriority > tskIDLE_PRIORITY ) || ( xTaskScheduled == pdTRUE ) ); - uxCurrentPriority--; + if(uxCurrentPriority > 0) { + uxCurrentPriority--; + } } configASSERT( taskTASK_IS_RUNNING( pxCurrentTCBs[ xCoreID ]->xTaskRunState ) );