From 72138486c8f731c062fbe53f3a842b3aaa23e63f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 28 Jul 2011 18:46:38 +0000 Subject: [PATCH] Yet another threading tool regression test scheduler sensitivity fix git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11934 --- helgrind/tests/tc01_simple_race.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helgrind/tests/tc01_simple_race.c b/helgrind/tests/tc01_simple_race.c index abf37b543..8e36b5b5a 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++;