]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Reverted last commit (r9326) -- its commit message did not make sense.
authorBart Van Assche <bvanassche@acm.org>
Sun, 8 Mar 2009 19:18:21 +0000 (19:18 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 8 Mar 2009 19:18:21 +0000 (19:18 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9328

drd/tests/linuxthreads_det.c

index 8343172bd7374cb77d3cd9a9dc46aadecb30bf1d..ec3e8edc5f00594a5a5c93b00db33e5e2d3f440b 100644 (file)
@@ -8,18 +8,11 @@
 #include <unistd.h>
 
 
-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;
 }