1 /* or1k use variant I, but with the twist that tp points to the end of TCB */
2 static inline struct pthread *__pthread_self()
6 __asm__ __volatile__ ("l.ori %0, r10, 0" : "=r" (tp) );
8 register char *tp __asm__("r10");
9 __asm__ __volatile__ ("" : "=r" (tp) );
11 return (struct pthread *) (tp - sizeof(struct pthread));
15 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))
17 /* word-offset to 'pc' in mcontext_t */
18 #define CANCEL_REG_IP 32