Rev 2482 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2482 | Rev 2586 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | */ |
28 | */ |
29 | 29 | ||
30 | /** @addtogroup libcsparc64 |
30 | /** @addtogroup libcsparc64 |
31 | * @{ |
31 | * @{ |
32 | */ |
32 | */ |
33 | /** |
- | |
34 | * @file |
- | |
35 | * @brief sparc64 TLS functions. |
- | |
36 | */ |
- | |
37 | 33 | ||
38 | #ifndef LIBC_sparc64_THREAD_H_ |
34 | #ifndef LIBC_sparc64_THREAD_H_ |
39 | #define LIBC_sparc64_THREAD_H_ |
35 | #define LIBC_sparc64_THREAD_H_ |
40 | 36 | ||
41 | typedef struct { |
- | |
42 | void *self; |
- | |
43 | void *fibril_data; |
- | |
44 | } tcb_t; |
- | |
45 | - | ||
46 | static inline void __tcb_set(tcb_t *tcb) |
- | |
47 | { |
- | |
48 | asm volatile ("mov %0, %%g7\n" : : "r" (tcb) : "g7"); |
- | |
49 | } |
- | |
50 | - | ||
51 | static inline tcb_t * __tcb_get(void) |
- | |
52 | { |
- | |
53 | void *retval; |
- | |
54 | - | ||
55 | asm volatile ("mov %%g7, %0\n" : "=r" (retval)); |
- | |
56 | - | ||
57 | return retval; |
- | |
58 | } |
- | |
59 | - | ||
60 | #endif |
37 | #endif |
61 | 38 | ||
62 | /** @} |
39 | /** @} |
63 | */ |
40 | */ |