]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Yet another threading tool regression test scheduler sensitivity fix
authorBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 18:46:38 +0000 (18:46 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 18:46:38 +0000 (18:46 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11934

helgrind/tests/tc01_simple_race.c

index abf37b543c13d91602aa488f9a671298cce41ba7..8e36b5b5ac4a72da9a1eaac69e34f451ea64d224 100644 (file)
@@ -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++;