projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
report that posix_spawn is supported in unistd.h and sysconf
[musl]
/
src
/
thread
/
__set_thread_area.c
diff --git
a/src/thread/__set_thread_area.c
b/src/thread/__set_thread_area.c
index
576d8b4
..
152a6a2
100644
(file)
--- a/
src/thread/__set_thread_area.c
+++ b/
src/thread/__set_thread_area.c
@@
-1,9
+1,10
@@
-#include "
syscal
l.h"
+#include "
pthread_imp
l.h"
-int __set_thread_area(
unsigned long *desc
)
+int __set_thread_area(
void *p
)
{
{
- if (syscall1(__NR_set_thread_area, (long)desc) < 0)
- return -1;
- __asm__ __volatile__ ( "movw %w0,%%gs" : : "r"(desc[0]*8+3) );
- return 0;
+#ifdef SYS_set_thread_area
+ return __syscall(SYS_set_thread_area, p);
+#else
+ return -ENOSYS;
+#endif
}
}