projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
finish unifying thread register handling in preparation for porting
[musl]
/
arch
/
i386
/
pthread_arch.h
diff --git a/arch/i386/pthread_arch.h
b/arch/i386/pthread_arch.h
new file mode 100644
(file)
index 0000000..
155b484
--- /dev/null
+++ b/
arch/i386/pthread_arch.h
@@ -0,0
+1,6
@@
+static inline struct pthread *__pthread_self()
+{
+ struct pthread *self;
+ __asm__ ("movl %%gs:0,%0" : "=r" (self) );
+ return self;
+}