From: Bart Van Assche Date: Tue, 26 Jul 2011 19:27:29 +0000 (+0000) Subject: helgrind/tests/tc08_hbl2: Reduce scheduler sensitivity X-Git-Tag: svn/VALGRIND_3_7_0~321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a66734e91d09fc264165780cb3e0e5c958aea12;p=thirdparty%2Fvalgrind.git helgrind/tests/tc08_hbl2: Reduce scheduler sensitivity git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11916 --- diff --git a/helgrind/tests/tc08_hbl2.c b/helgrind/tests/tc08_hbl2.c index 9c05e38d07..ed6fdb9ac2 100644 --- a/helgrind/tests/tc08_hbl2.c +++ b/helgrind/tests/tc08_hbl2.c @@ -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 */