]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Simplified test program.
authorBart Van Assche <bvanassche@acm.org>
Thu, 27 Nov 2008 17:48:36 +0000 (17:48 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 27 Nov 2008 17:48:36 +0000 (17:48 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8802

drd/tests/linuxthreads_det.c

index c589cb1d78198f12c830c9eee55b93865758eedb..ec3e8edc5f00594a5a5c93b00db33e5e2d3f440b 100644 (file)
@@ -8,7 +8,6 @@
 #include <unistd.h>
 
 
-static sem_t s_sem;
 static pid_t s_main_thread_pid;
 
 
@@ -22,7 +21,6 @@ void* thread_func(void* arg)
   {
     write(STDOUT_FILENO, "Detected LinuxThreads as POSIX threads implementation.\n", 55);
   }
-  sem_post(&s_sem);
   return 0;
 }
 
@@ -31,10 +29,7 @@ int main(int argc, char** argv)
   pthread_t threadid;
 
   s_main_thread_pid = getpid();
-  sem_init(&s_sem, 0, 0);
   pthread_create(&threadid, 0, thread_func, 0);
-  sem_wait(&s_sem);
   pthread_join(threadid, 0);
-  sem_destroy(&s_sem);
   return 0;
 }