From d0318b86e168844e8d7a764f21b0a87f4754f3aa Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 28 Jul 2011 17:48:48 +0000 Subject: [PATCH] Yet another regression test scheduling sensitivity fix git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11932 --- helgrind/tests/tc05_simple_race.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.47.2