From e8b26ec212bfc39b776df39f89895bc625315c96 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Wed, 11 Dec 2013 19:53:19 -0500 Subject: [PATCH] ck_spinlock: Minor readability changes to ck_hclh. --- include/ck_spinlock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ck_spinlock.h b/include/ck_spinlock.h index 3d78d8e..8f3b2b0 100644 --- a/include/ck_spinlock.h +++ b/include/ck_spinlock.h @@ -894,9 +894,10 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_queue, /* Now we need to splice the local queue into the global queue. */ local_tail = ck_pr_load_ptr(local_queue); - previous = ck_pr_fas_ptr(glob_queue, local_tail); ck_pr_store_uint(&local_tail->splice, true); + previous = ck_pr_fas_ptr(glob_queue, local_tail); + /* Wait until previous thread from the global queue is done with lock. */ while (ck_pr_load_uint(&previous->wait) == true) ck_pr_stall();