From 0741b42a44c3ccf29378e815df3de1111e4c6b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Wed, 25 Jun 2014 19:53:46 +0200 Subject: [PATCH] Add a sched_yeild in tocket lock test.. --- test/test_ticket_lock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_ticket_lock.c b/test/test_ticket_lock.c index 9e53f82..1bc857a 100644 --- a/test/test_ticket_lock.c +++ b/test/test_ticket_lock.c @@ -18,6 +18,7 @@ static void *update_thread(void *arg) struct ThreadArg *targ = arg; for (i = 0; i < targ->rounds; i++) { uc_ticket_lock(&lock); + sched_yield(); g_counter++; uc_ticket_unlock(&lock); }