2015-03-10 21:18:41 +00:00
|
|
|
static inline struct pthread *__pthread_self()
|
|
|
|
{
|
|
|
|
char *self;
|
2018-10-16 18:08:01 +00:00
|
|
|
__asm__ ("mrs %0,tpidr_el0" : "=r"(self));
|
2018-06-01 23:52:01 +00:00
|
|
|
return (void*)(self - sizeof(struct pthread));
|
2015-03-10 21:18:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define TLS_ABOVE_TP
|
2018-06-01 23:52:01 +00:00
|
|
|
#define GAP_ABOVE_TP 16
|
|
|
|
#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread))
|
2015-03-10 21:18:41 +00:00
|
|
|
|
2015-11-02 17:39:28 +00:00
|
|
|
#define MC_PC pc
|