summaryrefslogtreecommitdiffstats
path: root/regressions/ck_spinlock/ck_ticket.h
blob: 39054a697977ecb5b80fda2439b0eb1356bb2459 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <ck_spinlock.h>

#define LOCK_NAME "ck_ticket"
#define LOCK_DEFINE static ck_spinlock_ticket_t CK_CC_CACHELINE lock = CK_SPINLOCK_TICKET_INITIALIZER
#define LOCK ck_spinlock_ticket_lock(&lock)
#define UNLOCK ck_spinlock_ticket_unlock(&lock)
#ifdef CK_F_SPINLOCK_TICKET_TRYLOCK
#define TRYLOCK ck_spinlock_ticket_trylock(&lock)
#endif
#define LOCKED ck_spinlock_ticket_locked(&lock)