pthread_arch.h 322 B

123456789101112
  1. static inline struct pthread *__pthread_self()
  2. {
  3. struct pthread *self;
  4. #ifdef __clang__
  5. __asm__ __volatile__ (".word 0x7c03e83b ; move %0, $3" : "=r" (self) : : "$3" );
  6. #else
  7. __asm__ __volatile__ (".word 0x7c03e83b" : "=v" (self) );
  8. #endif
  9. return self;
  10. }
  11. #define CANCEL_REG_IP (3-(union {int __i; char __b;}){1}.__b)