You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/27 09:36:37 UTC
[incubator-nuttx] 03/03: tcbinfo: add packet align to struct tcbinfo
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6578461cc8fa05014f5ce6b4b8ea1caf83fc14dd
Author: zhuyanlin <zh...@xiaomi.com>
AuthorDate: Thu Jan 13 20:31:51 2022 +0800
tcbinfo: add packet align to struct tcbinfo
Signed-off-by: zhuyanlin <zh...@xiaomi.com>
---
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 05d0de8..710c2ef 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 245f759..b7597df 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;