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