]>
Commit | Line | Data |
---|---|---|
468777e1 UD |
1 | #include <sysdep.h> |
2 | #include <tls.h> | |
3 | ||
c393c588 RM |
4 | -- This line separates the #include lines from conditionals. |
5 | ||
468777e1 UD |
6 | # ifdef USE_TLS |
7 | ||
81757a63 | 8 | -- Abuse tls.h macros to derive offsets relative to the thread register. |
468777e1 UD |
9 | # undef __thread_register |
10 | # define __thread_register ((void *) 0) | |
11 | # define thread_offsetof(mem) ((void *) &THREAD_SELF->p_##mem - (void *) 0) | |
12 | ||
13 | # else | |
14 | ||
15 | # define thread_offsetof(mem) offsetof (tcbhead_t, mem) | |
16 | ||
17 | # endif | |
18 | ||
19 | MULTIPLE_THREADS_OFFSET thread_offsetof (multiple_threads) |