Rev 2482 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2482 | Rev 2586 | ||
|---|---|---|---|
| Line 35... | Line 35... | ||
| 35 | #ifndef LIBC_ia64_THREAD_H_ |
35 | #ifndef LIBC_ia64_THREAD_H_ |
| 36 | #define LIBC_ia64_THREAD_H_ |
36 | #define LIBC_ia64_THREAD_H_ |
| 37 | 37 | ||
| 38 | #define THREAD_INITIAL_STACK_PAGES_NO 2 |
38 | #define THREAD_INITIAL_STACK_PAGES_NO 2 |
| 39 | 39 | ||
| 40 | /* This structure must be exactly 16 bytes long */ |
- | |
| 41 | typedef struct { |
- | |
| 42 | void *dtv; /* unused in static linking*/ |
- | |
| 43 | void *fibril_data; |
- | |
| 44 | } tcb_t; |
- | |
| 45 | - | ||
| 46 | static inline void __tcb_set(tcb_t *tcb) |
- | |
| 47 | { |
- | |
| 48 | asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13"); |
- | |
| 49 | } |
- | |
| 50 | - | ||
| 51 | static inline tcb_t *__tcb_get(void) |
- | |
| 52 | { |
- | |
| 53 | void *retval; |
- | |
| 54 | - | ||
| 55 | asm volatile ("mov %0 = r13\n" : "=r" (retval)); |
- | |
| 56 | - | ||
| 57 | return retval; |
- | |
| 58 | } |
- | |
| 59 | - | ||
| 60 | #endif |
40 | #endif |
| 61 | 41 | ||
| 62 | /** @} |
42 | /** @} |
| 63 | */ |
43 | */ |