Document that tcb_segstack should not be reordered.
authorMichael Neumann <mneumann@ntecs.de>
Wed, 23 Jul 2014 00:12:28 +0000 (02:12 +0200)
committerMichael Neumann <mneumann@ntecs.de>
Wed, 23 Jul 2014 00:12:28 +0000 (02:12 +0200)
sys/cpu/i386/include/tls.h
sys/cpu/x86_64/include/tls.h

index 2478330..b4b1ce4 100644 (file)
@@ -55,7 +55,9 @@ struct tls_tcb {
        void *tcb_pthread;              /* thread library's data*/
        int *tcb_errno_p;               /* pointer to per-thread errno */
        void *tcb_segstack;             /* used for segmented stacks */
-                                       /* e.g. by LLVM to store stack bound */
+                                       /* e.g. by LLVM to store stack bound. */
+                                       /* NOTE: do not reorder this field */
+                                       /* as LLVM uses a fixed offset (16) */
        void *tcb_unused[3];
 };
 
index b6b695c..8a924fe 100644 (file)
@@ -54,6 +54,8 @@ struct tls_tcb {
        int *tcb_errno_p;               /* pointer to per-thread errno */
        void *tcb_segstack;             /* used for segmented stacks */
                                        /* e.g. by LLVM to store stack bound */
+                                       /* NOTE: do not reorder this field */
+                                       /* as LLVM uses a fixed offset (32) */
        void *tcb_unused[3];
 };