generic c version of __set_thread_area for archs where it works
authorRich Felker <dalias@aerifal.cx>
Wed, 11 Jul 2012 15:34:46 +0000 (11:34 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 11 Jul 2012 15:34:46 +0000 (11:34 -0400)
on other archs, like x86[_64], asm version is required

src/thread/__set_thread_area.c

index 136be575b8c4245a6cea788763d0081d5602ce25..152a6a216ba61e9eccbdd1f0738660af3f4f4097 100644 (file)
@@ -2,5 +2,9 @@
 
 int __set_thread_area(void *p)
 {
-       return -1;
+#ifdef SYS_set_thread_area
+       return __syscall(SYS_set_thread_area, p);
+#else
+       return -ENOSYS;
+#endif
 }