]> mj.ucw.cz Git - libucw.git/blobdiff - lib/threads.c
Merge with git+ssh://git.ucw.cz/projects/sherlock/GIT/sherlock.git
[libucw.git] / lib / threads.c
index ce55c0e6d2ec8702ba9a2309f943dbe0c91fbcd7..c7497f95247f5dc2d6205d1d080686d1ad02b30f 100644 (file)
 
 #ifdef CONFIG_LINUX
 #include <sys/types.h>
 
 #ifdef CONFIG_LINUX
 #include <sys/types.h>
-#include <linux/unistd.h>
+#include <sys/syscall.h>
+#include <unistd.h>
 #ifdef __NR_gettid
 #ifdef __NR_gettid
-static _syscall0(pid_t, gettid)
+static pid_t
+gettid(void)
+{
+  return syscall(__NR_gettid);
+}
 #define CONFIG_USE_GETTID
 #endif
 #endif
 #define CONFIG_USE_GETTID
 #endif
 #endif
@@ -87,7 +92,7 @@ ucwlib_unlock(void)
 #else
 
 struct ucwlib_context *
 #else
 
 struct ucwlib_context *
-ucw_thread_context(void)
+ucwlib_thread_context(void)
 {
   static struct ucwlib_context ucwlib_context;
   return &ucwlib_context;
 {
   static struct ucwlib_context ucwlib_context;
   return &ucwlib_context;