It seems there are some kernels around where the getpid system call has
been changed to return the ID of the thread group leader but which do not
have a gettid system call.

This breaks VG_(gettid) which assumes that the getpid system call will
give the thread ID if the gettid system call does not exist.

The (horrible) solution is to use readlink to see where /proc/self points
when the gettid system call fails.

BUG: 82114


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2771 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed