From e6c0ef01a5ee618ced0761e3fa495249de2adf94 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Wed, 11 Dec 2013 20:30:13 -0500 Subject: [PATCH] ck_spinlock: Revert previous change, do not splice too early. --- include/ck_spinlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ck_spinlock.h b/include/ck_spinlock.h index 8f3b2b0..8c8e996 100644 --- a/include/ck_spinlock.h +++ b/include/ck_spinlock.h @@ -894,10 +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); - ck_pr_store_uint(&local_tail->splice, true); - previous = ck_pr_fas_ptr(glob_queue, local_tail); + ck_pr_store_uint(&local_tail->splice, true); + /* Wait until previous thread from the global queue is done with lock. */ while (ck_pr_load_uint(&previous->wait) == true) ck_pr_stall();