]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Yet another regression test scheduling sensitivity fix
authorBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 17:48:48 +0000 (17:48 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 28 Jul 2011 17:48:48 +0000 (17:48 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11932

helgrind/tests/tc05_simple_race.c

index 287c12c48d6d0380790bba3582881b26a74d2cde..0d20a51b6d02941d44ef86edc1ec40aa9ef7bb18 100644 (file)
@@ -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 );