github.com/cyub/threadlocal@v0.0.0-20220816024249-5db4997a97f4/thread_x86.s (about) 1 #include "textflag.h" 2 3 #define SYS_gettid 186 4 5 TEXT ·ThreadId(SB),NOSPLIT,$0-4 6 MOVL $SYS_gettid, AX 7 SYSCALL 8 MOVL AX, ret+0(FP) 9 RET 10 11 TEXT ·Gid(SB),NOSPLIT,$0-8 12 MOVQ (TLS), CX 13 MOVQ 152(CX), AX 14 MOVQ AX, ret+0(FP) 15 RET 16 17