blob: 1a8e2114a92c8784fe618bc1b4f666c21ed529f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#ifndef __ASM_THREAD_H
#define __ASM_THREAD_H
#include <stdint.h>
static __inline uintptr_t __thread_self(void)
{
uintptr_t tp;
__asm__("mov %%fs:0,%0" : "=r"(tp));
return tp;
}
#endif
|