]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
helgrind/tests/tc08_hbl2: Reduce scheduler sensitivity
authorBart Van Assche <bvanassche@acm.org>
Tue, 26 Jul 2011 19:27:29 +0000 (19:27 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 26 Jul 2011 19:27:29 +0000 (19:27 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11916

helgrind/tests/tc08_hbl2.c

index 9c05e38d073c57bac1ed48f677aa75373b9f0e05..ed6fdb9ac2da7eff0a389fe0f89bbb1577ae4e53 100644 (file)
@@ -121,6 +121,7 @@ void* child_fn ( void* arg )
 
 int main ( void )
 {
+   struct timespec delay = { 0, 100 * 1000 * 1000 };
    pthread_t child;
    int i;
 
@@ -129,6 +130,8 @@ int main ( void )
       exit(1);
    }
 
+   nanosleep(&delay, 0);
+
    for (i = 0; i < LIMIT; i++) {
       INC(x, "main");
       if (i == 5) sleep(1); /* make sure child doesn't starve */