sched/init: use enum type for g_nx_initstate

Change g_nx_initstate type from uint8_t to enum nx_initstate_e.
Avoid enum/integer base-type mismatch in init state comparisons.
Satisfies MISRA C:2012 Rule 10.4 without behavior change.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong
2025-09-28 21:34:43 +08:00
committed by Xiang Xiao
parent d38078b778
commit cd958831d8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ extern "C"
* hardware resources may not yet be available to the OS-internal logic.
*/
EXTERN volatile uint8_t g_nx_initstate; /* See enum nx_initstate_e */
EXTERN volatile enum nx_initstate_e g_nx_initstate; /* See enum nx_initstate_e */
/****************************************************************************
* Public Function Prototypes
+1 -1
View File
@@ -185,7 +185,7 @@ struct tasklist_s g_tasklisttable[NUM_TASK_STATES];
* hardware resources may not yet be available to the kernel logic.
*/
volatile uint8_t g_nx_initstate; /* See enum nx_initstate_e */
volatile enum nx_initstate_e g_nx_initstate; /* See enum nx_initstate_e */
/* This is an array of task control block (TCB) for the IDLE thread of each
* CPU. For the non-SMP case, this is a a single TCB; For the SMP case,