From: Brian Norris Date: Wed, 3 Apr 2013 00:28:59 +0000 (-0700) Subject: test: mutextest: add thread yield point X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=d64297b7d0bc9c9bf48e95aec5d14cd2ab8c90a1 test: mutextest: add thread yield point --- diff --git a/test/mutextest.cc b/test/mutextest.cc index 968d9c48..01226a71 100644 --- a/test/mutextest.cc +++ b/test/mutextest.cc @@ -17,7 +17,7 @@ static void a(void *obj) m->unlock(); } else { while(!m->try_lock()) - ; + thrd_yield(); store_32(&shareddata,(unsigned int)i); m->unlock(); }