ck_spinlock: Add ck_spinlock_mcs_init operation.

ck_pring
Samy Al Bahra 11 years ago
parent 6bc9f7a485
commit ce142f17f8

@ -724,6 +724,14 @@ typedef struct ck_spinlock_mcs ck_spinlock_mcs_context_t;
#define CK_SPINLOCK_MCS_INITIALIZER (NULL) #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_CC_INLINE static bool
ck_spinlock_mcs_trylock(struct ck_spinlock_mcs **queue, struct ck_spinlock_mcs *node) ck_spinlock_mcs_trylock(struct ck_spinlock_mcs **queue, struct ck_spinlock_mcs *node)
{ {

Loading…
Cancel
Save