-PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxCurrentNumberOfTasks = ( unsigned portBASE_TYPE ) 0U;\r
-PRIVILEGED_DATA static volatile portTickType xTickCount = ( portTickType ) 0U;\r
-PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxTopReadyPriority = tskIDLE_PRIORITY;\r
-PRIVILEGED_DATA static volatile signed portBASE_TYPE xSchedulerRunning = pdFALSE;\r
-PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxSchedulerSuspended = ( unsigned portBASE_TYPE ) pdFALSE;\r
-PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxPendedTicks = ( unsigned portBASE_TYPE ) 0U;\r
-PRIVILEGED_DATA static volatile portBASE_TYPE xYieldPending = pdFALSE;\r
-PRIVILEGED_DATA static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;\r
-PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber = ( unsigned portBASE_TYPE ) 0U;\r
-PRIVILEGED_DATA static volatile portTickType xNextTaskUnblockTime = portMAX_DELAY;\r
+PRIVILEGED_DATA static volatile UBaseType_t uxCurrentNumberOfTasks = ( UBaseType_t ) 0U;\r
+PRIVILEGED_DATA static volatile TickType_t xTickCount = ( TickType_t ) 0U;\r
+PRIVILEGED_DATA static volatile UBaseType_t uxTopReadyPriority = tskIDLE_PRIORITY;\r
+PRIVILEGED_DATA static volatile BaseType_t xSchedulerRunning = pdFALSE;\r
+PRIVILEGED_DATA static volatile UBaseType_t uxPendedTicks = ( UBaseType_t ) 0U;\r
+PRIVILEGED_DATA static volatile BaseType_t xYieldPending = pdFALSE;\r
+PRIVILEGED_DATA static volatile BaseType_t xNumOfOverflows = ( BaseType_t ) 0;\r
+PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;\r
+PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = portMAX_DELAY;\r
+\r
+/* Context switches are held pending while the scheduler is suspended. Also,\r
+interrupts must not manipulate the xStateListItem of a TCB, or any of the\r
+lists the xStateListItem can be referenced from, if the scheduler is suspended.\r
+If an interrupt needs to unblock a task while the scheduler is suspended then it\r
+moves the task's event list item into the xPendingReadyList, ready for the\r
+kernel to move the task from the pending ready list into the real ready list\r
+when the scheduler is unsuspended. The pending ready list itself can only be\r
+accessed from a critical section. */\r
+PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t ) pdFALSE;\r