From d64297b7d0bc9c9bf48e95aec5d14cd2ab8c90a1 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 2 Apr 2013 17:28:59 -0700 Subject: [PATCH] test: mutextest: add thread yield point --- test/mutextest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.34.1