Several users in the past have noted it was difficult for them to decide what spinlock implementation to use. In light of this, a light-weight greedy default is chosen (currently ck_spinlock_fas).ck_pring
parent
50f6f6ee02
commit
1cefea7eb6
@ -0,0 +1,7 @@
|
||||
#include "../ck_spinlock.h"
|
||||
|
||||
#ifdef THROUGHPUT
|
||||
#include "throughput.h"
|
||||
#elif defined(LATENCY)
|
||||
#include "latency.h"
|
||||
#endif
|
@ -0,0 +1,5 @@
|
||||
#define LOCK_NAME "ck_spinlock"
|
||||
#define LOCK_DEFINE static ck_spinlock_t CK_CC_CACHELINE lock = CK_SPINLOCK_INITIALIZER
|
||||
#define LOCK ck_spinlock_lock_eb(&lock)
|
||||
#define UNLOCK ck_spinlock_unlock(&lock)
|
||||
|
@ -0,0 +1,2 @@
|
||||
#include "../ck_spinlock.h"
|
||||
#include "validate.h"
|
Loading…
Reference in new issue