change(freertos-smp): Reconcile granular lock changes from upstream development

Integrate latest granular lock reconciliation changes from the development
branch (chinglee-iot/FreeRTOS-Kernel, branch
dev/update_for_granular_lock_demo_TCB_lock) to establish a common baseline
for continued granular lock development.

Key changes:
- Eliminate configUSE_TCB_DATA_GROUP_LOCK; TCB locks now integral to
  portUSING_GRANULAR_LOCKS
- Convert taskDATA_GROUP_ENTER_CRITICAL to function for run-state checking
- Rename prvTaskPreemptionEnable to xTaskPreemptionEnableWithYieldStatus
- Add prvTaskDataGroupCheckForRunStateChange, prvKernelEnterISROnlyCritical,
  xTaskUnlockCanYield
- Restructure prvYieldCore and prvYieldForTask with TCB spinlock protection
- Add scheduler suspension in event group list walking
- Add queue set container spinlock protection
- Enable single-priority mode with preemption disable
- Expose timer spinlocks for testing

Bug fixes applied during reconciliation:
- Fix typo: vTaskTCBExtiCritical -> vTaskTCBExitCritical
- Fix unused variable in xTaskPreemptionEnableWithYieldStatus
- Fix broken tick hook preprocessor guard
- Fix unused variable in prvNotifyQueueSetContainerFromISR
This commit is contained in:
Sudeep Mohanty 2026-04-23 15:36:59 +02:00
parent d33a460b99
commit 3346ee9078
6 changed files with 591 additions and 289 deletions

View file

@ -161,8 +161,13 @@
PRIVILEGED_DATA static TaskHandle_t xTimerTaskHandle = NULL;
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
PRIVILEGED_DATA static portSPINLOCK_TYPE xTimerTaskSpinlock = portINIT_SPINLOCK_STATIC;
PRIVILEGED_DATA static portSPINLOCK_TYPE xTimerISRSpinlock = portINIT_SPINLOCK_STATIC;
#ifdef portREMOVE_STATIC_QUALIFIER
PRIVILEGED_DATA portSPINLOCK_TYPE xTimerTaskSpinlock = portINIT_SPINLOCK_STATIC;
PRIVILEGED_DATA portSPINLOCK_TYPE xTimerISRSpinlock = portINIT_SPINLOCK_STATIC;
#else
PRIVILEGED_DATA static portSPINLOCK_TYPE xTimerTaskSpinlock = portINIT_SPINLOCK_STATIC;
PRIVILEGED_DATA static portSPINLOCK_TYPE xTimerISRSpinlock = portINIT_SPINLOCK_STATIC;
#endif
#endif /* #if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
/*-----------------------------------------------------------*/