[vdr] VDR gets somehow stuck and consumes all CPU time

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Dec 10 12:05:13 CET 2005


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



More information about the vdr mailing list