mirror of
git://git.musl-libc.org/musl
synced 2024-12-20 05:41:00 +00:00
e1e4d6b269
the fields in the mcontext_t are long long (for no good reason) even on 32-bit mips, so the offset of the instruction pointer (as a word) varies depending on endianness.
9 lines
210 B
C
9 lines
210 B
C
static inline struct pthread *__pthread_self()
|
|
{
|
|
struct pthread *self;
|
|
__asm__ __volatile__ (".word 0x7c03e83b" : "=v" (self) );
|
|
return self;
|
|
}
|
|
|
|
#define CANCEL_REG_IP (3-(union {int __i; char __b;}){1}.__b)
|