Rev 1125 | Rev 1167 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1125 | Rev 1129 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | */ |
27 | */ |
28 | 28 | ||
29 | #ifndef __LIBC__ia64THREAD_H__ |
29 | #ifndef __LIBC__ia64THREAD_H__ |
30 | #define __LIBC__ia64THREAD_H__ |
30 | #define __LIBC__ia64THREAD_H__ |
31 | 31 | ||
- | 32 | /* This structure must be exactly 16 bytes long */ |
|
- | 33 | typedef struct { |
|
- | 34 | void *dtv; /* unused in static linking*/ |
|
- | 35 | void *pst_data; |
|
- | 36 | } tcb_t; |
|
- | 37 | ||
32 | static inline void __tls_set(void *tls) |
38 | static inline void __tcb_set(tcb_t *tcb) |
33 | { |
39 | { |
34 | __asm__ volatile ("mov r13 = %0\n" : : "r" (tls) : "r13"); |
40 | __asm__ volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13"); |
35 | } |
41 | } |
36 | 42 | ||
37 | static inline void *__tls_get(void) |
43 | static inline tcb_t *__tcb_get(void) |
38 | { |
44 | { |
39 | void *retval; |
45 | void *retval; |
40 | 46 | ||
41 | __asm__ volatile ("mov %0 = r13\n" : "=r" (retval)); |
47 | __asm__ volatile ("mov %0 = r13\n" : "=r" (retval)); |
42 | 48 |