repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
make thread-pointer-loading asm non-volatile
[musl.git]
/
arch
/
x86_64
/
pthread_arch.h
blob
65e880c62e2fa13ec874a7a7092b3c8093d5cbe3
1
static
inline
struct
pthread
*
__pthread_self
()
2
{
3
struct
pthread
*
self
;
4
__asm__
(
"mov %%fs:0,%0"
:
"=r"
(
self
) );
5
return
self
;
6
}
7
8
#define TP_ADJ(p) (p)
9
10
#define MC_PC gregs[REG_RIP]