From: Bart Van Assche Date: Sun, 8 Mar 2009 19:18:21 +0000 (+0000) Subject: Reverted last commit (r9326) -- its commit message did not make sense. X-Git-Tag: svn/VALGRIND_3_5_0~896 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=705d96dac4a5cc92e574386db5474b3099264dcb;p=thirdparty%2Fvalgrind.git Reverted last commit (r9326) -- its commit message did not make sense. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9328 --- diff --git a/drd/tests/linuxthreads_det.c b/drd/tests/linuxthreads_det.c index 8343172bd7..ec3e8edc5f 100644 --- a/drd/tests/linuxthreads_det.c +++ b/drd/tests/linuxthreads_det.c @@ -8,18 +8,11 @@ #include -static pthread_mutex_t s_mutex; static pid_t s_main_thread_pid; void* thread_func(void* arg) { - pid_t main_thread_pid; - - pthread_mutex_lock(&s_mutex); - main_thread_pid = s_main_thread_pid; - pthread_mutex_unlock(&s_mutex); - if (s_main_thread_pid == getpid()) { write(STDOUT_FILENO, "NPTL or non-Linux POSIX threads implementation detected.\n", 57); @@ -35,15 +28,8 @@ int main(int argc, char** argv) { pthread_t threadid; - pthread_mutex_init(&s_mutex, 0); - - pthread_mutex_lock(&s_mutex); s_main_thread_pid = getpid(); - pthread_mutex_unlock(&s_mutex); pthread_create(&threadid, 0, thread_func, 0); pthread_join(threadid, 0); - - pthread_mutex_destroy(&s_mutex); - return 0; }