]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Revert r11916, r11917, r11918 and r11923.
authorBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 10:00:38 +0000 (10:00 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 10:00:38 +0000 (10:00 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11927

drd/tests/annotate_smart_pointer.cpp
drd/tests/atomic_var.c
drd/tests/pth_barrier.c
drd/tests/tc19_shadowmem.vgtest
helgrind/tests/hg04_race.c
helgrind/tests/tc08_hbl2.c

index af085b536633a06a4511431c42781b8d7322f3e0..cf6e6ac73e7041147c7f84394c65ee9ab81b591a 100755 (executable)
@@ -305,7 +305,6 @@ static void* thread_func(void* arg)
 
 int main(int argc, char** argv)
 {
-  struct timespec delay = { 0, 100 * 1000 * 1000 };
   const int nthreads = std::max(argc > 1 ? atoi(argv[1]) : 1, 1);
   const int iterations = std::max(argc > 2 ? atoi(argv[2]) : 1, 1);
   s_enable_annotations = argc > 3 ? !!atoi(argv[3]) : true;
@@ -319,7 +318,6 @@ int main(int argc, char** argv)
     for (int i = 0; i < nthreads; ++i)
       T[i].Create(thread_func, new smart_ptr<counter>(p));
     p = NULL;
-    nanosleep(&delay, 0);
     for (int i = 0; i < nthreads; ++i)
       T[i].Join();
   }
index 4bedebd99abac205e7681db0bdeada312a0a47b9..40f15669e3d9d6b929c18e9cd2372330017fb682 100644 (file)
@@ -53,13 +53,11 @@ int main(int argc, char** argv)
 {
   int i;
   const int n_threads = 2;
-  const struct timespec delay = { 0, 100 * 1000 * 1000 };
   pthread_t tid[n_threads];
 
   fprintf(stderr, "Start of test.\n");
   pthread_create(&tid[0], 0, thread_func_1, 0);
   pthread_create(&tid[1], 0, thread_func_2, 0);
-  nanosleep(&delay, 0);
   for (i = 0; i < n_threads; i++)
     pthread_join(tid[i], 0);
   fprintf(stderr, "Test finished.\n");
index 98fc5474ee161d1a8bf5ec2156db6aef9ccff39d..e0b40a7a134bc1613f2fe2d6aa9358ba6d863bad 100644 (file)
@@ -64,7 +64,6 @@ static void* threadfunc(struct threadinfo* p)
 static void barriers_and_races(const int nthread, const int iterations)
 {
   int i;
-  const struct timespec delay = { 0, 100 * 1000 * 1000 };
   struct threadinfo* t;
   pthread_barrier_t b;
   int* array;
@@ -85,8 +84,6 @@ static void barriers_and_races(const int nthread, const int iterations)
     pthread_create(&t[i].tid, 0, (void*(*)(void*))threadfunc, &t[i]);
   }
 
-  nanosleep(&delay, 0);
-
   for (i = 0; i < nthread; i++)
   {
     pthread_join(t[i].tid, 0);
index 35cf99720eeb9d6ae6347f9c84030762f78c8a4d..cf2542de5308d062a01d98b2d007bd3f917b38e0 100644 (file)
@@ -1,4 +1,4 @@
-prereq: false && ./supported_libpthread
+prereq: ./supported_libpthread
 prog: ../../helgrind/tests/tc19_shadowmem
 vgopts: --error-limit=no --read-var-info=yes --show-confl-seg=no --num-callers=3
 stderr_filter: filter_stderr_and_thread_no
index 3b23f8f9b7d620376b82c8d205974508e7f3a647..111195bf903f8d6ba91194bfc8be60d7b12215e7 100644 (file)
@@ -14,15 +14,12 @@ static void *th(void *v)
 
 int main()
 {
-       const struct timespec delay = { 0, 100 * 1000 * 1000 };
        pthread_t a, b;
 
        pthread_create(&a, NULL, th, NULL);     
-       nanosleep(&delay, 0);   /* force ordering */
+       sleep(1);               /* force ordering */
        pthread_create(&b, NULL, th, NULL);
 
-       nanosleep(&delay, 0);   /* avoid false ordering between threads */
-
        pthread_join(a, NULL);
        pthread_join(b, NULL);
 
index ae0083e41e99d843752eecdfe6cdfd6d059c9783..9c05e38d073c57bac1ed48f677aa75373b9f0e05 100644 (file)
@@ -121,7 +121,6 @@ void* child_fn ( void* arg )
 
 int main ( void )
 {
-   const struct timespec delay = { 0, 100 * 1000 * 1000 };
    pthread_t child;
    int i;
 
@@ -135,8 +134,6 @@ int main ( void )
       if (i == 5) sleep(1); /* make sure child doesn't starve */
    }
 
-   nanosleep(&delay, 0);
-
    if (pthread_join(child, NULL)) {
       perror("pthread join");
       exit(1);