From 6578461cc8fa05014f5ce6b4b8ea1caf83fc14dd Mon Sep 17 00:00:00 2001 From: zhuyanlin Date: Thu, 13 Jan 2022 20:31:51 +0800 Subject: [PATCH] tcbinfo: add packet align to struct tcbinfo Signed-off-by: zhuyanlin --- include/nuttx/sched.h | 4 ++-- tools/jlink-nuttx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 05d0de897e..710c2ef6cf 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -766,7 +766,7 @@ struct pthread_tcb_s */ #ifdef CONFIG_DEBUG_TCBINFO -struct tcbinfo_s +begin_packed_struct struct tcbinfo_s { uint16_t pid_off; /* Offset of tcb.pid */ uint16_t state_off; /* Offset of tcb.task_state */ @@ -787,7 +787,7 @@ struct tcbinfo_s uint8_t u[8]; FAR uint16_t *p; } reg_off; -}; +} end_packed_struct; #endif /* This is the callback type used by nxsched_foreach() */ diff --git a/tools/jlink-nuttx.c b/tools/jlink-nuttx.c index 245f759d0a..b7597dfad7 100644 --- a/tools/jlink-nuttx.c +++ b/tools/jlink-nuttx.c @@ -72,7 +72,7 @@ enum symbol_e NSYMBOLS }; -struct tcbinfo_s +__attribute__ ((packed)) struct tcbinfo_s { uint16_t pid_off; uint16_t state_off;