From ce142f17f81419cf1666e5389e928bbc7c04adfd Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Fri, 26 Jul 2013 16:27:09 -0400 Subject: [PATCH] ck_spinlock: Add ck_spinlock_mcs_init operation. --- include/ck_spinlock.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/ck_spinlock.h b/include/ck_spinlock.h index b38a4f9..a49ef6b 100644 --- a/include/ck_spinlock.h +++ b/include/ck_spinlock.h @@ -724,6 +724,14 @@ typedef struct ck_spinlock_mcs ck_spinlock_mcs_context_t; #define CK_SPINLOCK_MCS_INITIALIZER (NULL) +CK_CC_INLINE static void +ck_spinlock_mcs_init(struct ck_spinlock_mcs **queue) +{ + + ck_pr_store_ptr(queue, NULL); + return; +} + CK_CC_INLINE static bool ck_spinlock_mcs_trylock(struct ck_spinlock_mcs **queue, struct ck_spinlock_mcs *node) {