From: Brian Norris Date: Wed, 3 Apr 2013 00:28:59 +0000 (-0700) Subject: test: mutextest: add thread yield point X-Git-Tag: oopsla2013~114 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d64297b7d0bc9c9bf48e95aec5d14cd2ab8c90a1;p=model-checker.git test: mutextest: add thread yield point --- diff --git a/test/mutextest.cc b/test/mutextest.cc index 968d9c4..01226a7 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(); }