VDR gets somehow stuck and consumes all CPU time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Stezenbach wrote:
> ...
> pthread_self() has to be used within programs using to identify
> the threads. gettid() is more a debugging aid as the return value
> of pthread_self() has no meaning outside the context of the running
> program. (Funny that glibc doesn't have a syscall wrapper for
> gettid(); dietlibc has.)
> 
> Johannes

Thanks, this appears to work just fine.

I assume it's ok to use the SYS_gettid macro, as in



#include <sys/syscall.h>

static inline pid_t gettid(void)
{
   return syscall(SYS_gettid);
}



instead of the hardcoded 224.

Klaus


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux