X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fthreads.c;h=c7497f95247f5dc2d6205d1d080686d1ad02b30f;hb=d18403664f23ca1464d659b29912758d72b2abec;hp=ce55c0e6d2ec8702ba9a2309f943dbe0c91fbcd7;hpb=a996044f96a0600122c4f208663ae79715868bbc;p=libucw.git diff --git a/lib/threads.c b/lib/threads.c index ce55c0e6..c7497f95 100644 --- a/lib/threads.c +++ b/lib/threads.c @@ -16,9 +16,14 @@ #ifdef CONFIG_LINUX #include -#include +#include +#include #ifdef __NR_gettid -static _syscall0(pid_t, gettid) +static pid_t +gettid(void) +{ + return syscall(__NR_gettid); +} #define CONFIG_USE_GETTID #endif #endif @@ -87,7 +92,7 @@ ucwlib_unlock(void) #else struct ucwlib_context * -ucw_thread_context(void) +ucwlib_thread_context(void) { static struct ucwlib_context ucwlib_context; return &ucwlib_context;