|
|
@ -88,7 +88,7 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_queue,
|
|
|
|
ck_pr_fence_store_atomic();
|
|
|
|
ck_pr_fence_store_atomic();
|
|
|
|
|
|
|
|
|
|
|
|
/* Mark current request as last request. Save reference to previous request. */
|
|
|
|
/* Mark current request as last request. Save reference to previous request. */
|
|
|
|
previous = CK_CPP_CAST(struct ck_spinlock_hclh *, ck_pr_fas_ptr(local_queue, thread));
|
|
|
|
previous = ck_pr_fas_ptr(local_queue, thread);
|
|
|
|
thread->previous = previous;
|
|
|
|
thread->previous = previous;
|
|
|
|
|
|
|
|
|
|
|
|
/* Wait until previous thread from the local queue is done with lock. */
|
|
|
|
/* Wait until previous thread from the local queue is done with lock. */
|
|
|
@ -107,7 +107,7 @@ ck_spinlock_hclh_lock(struct ck_spinlock_hclh **glob_queue,
|
|
|
|
|
|
|
|
|
|
|
|
/* Now we need to splice the local queue into the global queue. */
|
|
|
|
/* Now we need to splice the local queue into the global queue. */
|
|
|
|
local_tail = ck_pr_load_ptr(local_queue);
|
|
|
|
local_tail = ck_pr_load_ptr(local_queue);
|
|
|
|
previous = CK_CPP_CAST(struct ck_spinlock_hclh *, ck_pr_fas_ptr(glob_queue, local_tail));
|
|
|
|
previous = ck_pr_fas_ptr(glob_queue, local_tail);
|
|
|
|
|
|
|
|
|
|
|
|
ck_pr_store_uint(&local_tail->splice, true);
|
|
|
|
ck_pr_store_uint(&local_tail->splice, true);
|
|
|
|
|
|
|
|
|
|
|
|