From: Bart Van Assche Date: Thu, 28 Jul 2011 17:48:48 +0000 (+0000) Subject: Yet another regression test scheduling sensitivity fix X-Git-Tag: svn/VALGRIND_3_7_0~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0318b86e168844e8d7a764f21b0a87f4754f3aa;p=thirdparty%2Fvalgrind.git Yet another regression test scheduling sensitivity fix git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11932 --- diff --git a/helgrind/tests/tc05_simple_race.c b/helgrind/tests/tc05_simple_race.c index 287c12c48d..0d20a51b6d 100644 --- a/helgrind/tests/tc05_simple_race.c +++ b/helgrind/tests/tc05_simple_race.c @@ -22,13 +22,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); /* "Thread 1" in the paper */ y = y + 1; pthread_mutex_lock( &mu );