[rtems commit] score: Fix size of TLS_Thread_control_block

Sebastian Huber sebh at rtems.org
Mon Mar 23 14:58:22 UTC 2020


Module:    rtems
Branch:    master
Commit:    24c21795ea12380b9594d37f34a30432b56a73c6
Changeset: http://git.rtems.org/rtems/commit/?id=24c21795ea12380b9594d37f34a30432b56a73c6

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 23 15:54:59 2020 +0100

score: Fix size of TLS_Thread_control_block

On most architectures, the size of the thread-local storage TCB must be
8 bytes.  Fix the definition for 64-bit targets.

---

 cpukit/include/rtems/score/tls.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/score/tls.h b/cpukit/include/rtems/score/tls.h
index 1b9dae1..bfe6ff3 100644
--- a/cpukit/include/rtems/score/tls.h
+++ b/cpukit/include/rtems/score/tls.h
@@ -73,10 +73,12 @@ typedef struct {
 typedef struct TLS_Thread_control_block {
 #ifdef __i386__
   struct TLS_Thread_control_block *tcb;
-#else
+#else /* !__i386__ */
   TLS_Dynamic_thread_vector *dtv;
+#if CPU_SIZEOF_POINTER == 4
   uintptr_t reserved;
 #endif
+#endif /* __i386__ */
 } TLS_Thread_control_block;
 
 typedef struct {



More information about the vc mailing list