From 758c042b0163df21091e3338c28b22c4b20b4b56 Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Thu, 23 Sep 2021 12:20:10 +0800 Subject: [PATCH] sched:tcb_s:rearrange sched_priority/int_priority to word align As pid_t is uint16_t,this could save space for many archs. Signed-off-by: zhuyanlin --- include/nuttx/sched.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 36c7ebadd79..3ee50dc8520 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -598,11 +598,14 @@ struct tcb_s /* Task Management Fields *************************************************/ pid_t pid; /* This is the ID of the thread */ - start_t start; /* Thread start function */ - entry_t entry; /* Entry Point into the thread */ uint8_t sched_priority; /* Current priority of the thread */ uint8_t init_priority; /* Initial priority of the thread */ + start_t start; /* Thread start function */ + entry_t entry; /* Entry Point into the thread */ + + uint8_t task_state; /* Current state of the thread */ + #ifdef CONFIG_PRIORITY_INHERITANCE #if CONFIG_SEM_NNESTPRIO > 0 uint8_t npend_reprio; /* Number of nested reprioritizations */ @@ -611,7 +614,6 @@ struct tcb_s uint8_t base_priority; /* "Normal" priority of the thread */ #endif - uint8_t task_state; /* Current state of the thread */ #ifdef CONFIG_SMP uint8_t cpu; /* CPU index if running/assigned */ cpu_set_t affinity; /* Bit set of permitted CPUs */