]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd/tests/atomic_var: Reduce scheduler sensitivity
authorBart Van Assche <bvanassche@acm.org>
Tue, 26 Jul 2011 19:28:52 +0000 (19:28 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 26 Jul 2011 19:28:52 +0000 (19:28 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11918

drd/tests/atomic_var.c

index 40f15669e3d9d6b929c18e9cd2372330017fb682..78902d5598ad7a3f71ce295c569324868aa227db 100644 (file)
@@ -36,6 +36,9 @@ static int s_y = 0;
 
 static void* thread_func_1(void* arg)
 {
+  struct timespec delay = { 0, 100 * 1000 * 1000 };
+
+  nanosleep(&delay, 0);
   s_y = 1;
   (void) sync_add_and_fetch(&s_x, 1);
   return 0;