Changeset fa23560 in mainline for uspace/lib/libc/arch/ppc64/include/thread.h
- Timestamp:
- 2007-10-30T22:54:11Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d21cf8
- Parents:
- b2a0f6dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/ppc64/include/thread.h
rb2a0f6dd rfa23560 36 36 #define LIBC_ppc64_THREAD_H_ 37 37 38 #define PPC_TP_OFFSET 0x700039 40 typedef struct {41 void *fibril_data;42 } tcb_t;43 44 static inline void __tcb_set(tcb_t *tcb)45 {46 void *tp = tcb;47 tp += PPC_TP_OFFSET + sizeof(tcb_t);48 49 asm volatile (50 "mr %%r2, %0\n"51 :52 : "r" (tp)53 );54 }55 56 static inline tcb_t * __tcb_get(void)57 {58 void * retval;59 60 asm volatile (61 "mr %0, %%r2\n"62 : "=r" (retval)63 );64 65 return (tcb_t *)(retval - PPC_TP_OFFSET - sizeof(tcb_t));66 }67 68 38 #endif 69 39
Note:
See TracChangeset
for help on using the changeset viewer.