[Linux-cluster] CS4 Update 4/ about __NR_gettid and syscall
Alain Moulle
Alain.Moulle at bull.net
Tue Aug 8 13:08:38 UTC 2006
Hi
In CS4 Update 4 , there are several places where a syscall call
is dependant on NR_gettid set or not , for example in qdisk/gettid.c :
#include <sys/types.h>
#include <linux/unistd.h>
#include <gettid.h>
#include <errno.h>
/* Patch from Adam Conrad / Ubuntu: Don't use _syscall macro */
#ifdef __NR_gettid
pid_t gettid (void)
{
return syscall(__NR_gettid);
}
#else
#warn "gettid not available -- substituting with pthread_self()"
#include <pthread.h>
pid_t gettid (void)
{
return (pid_t)pthread_self();
}
#endif
and also in :
magma-plugins-1.0.9/gulm/gulm.c
rgmanager-1.9.52/src/clulib/gettid
And in fact, I have compilation error if the syscall is choosen by the ifdef ,
so I wonder what to do about that , what does __NR_gettid means ,etc.
Any piece of advise ?
Thanks
Alain
More information about the Linux-cluster
mailing list