From: Bart Van Assche Date: Thu, 28 Jul 2011 18:46:38 +0000 (+0000) Subject: Yet another threading tool regression test scheduler sensitivity fix X-Git-Tag: svn/VALGRIND_3_7_0~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72138486c8f731c062fbe53f3a842b3aaa23e63f;p=thirdparty%2Fvalgrind.git Yet another threading tool regression test scheduler sensitivity fix git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11934 --- diff --git a/helgrind/tests/tc01_simple_race.c b/helgrind/tests/tc01_simple_race.c index abf37b543c..8e36b5b5ac 100644 --- a/helgrind/tests/tc01_simple_race.c +++ b/helgrind/tests/tc01_simple_race.c @@ -17,13 +17,13 @@ void* child_fn ( void* arg ) int main ( void ) { + const struct timespec delay = { 0, 100 * 1000 * 1000 }; pthread_t child; - if (pthread_create(&child, NULL, child_fn, NULL)) { perror("pthread_create"); exit(1); } - + nanosleep(&delay, 0); /* Unprotected relative to child */ x++;