29 #if defined(STM_CPU_SPARC)
30 #define MAX_TATAS_BACKOFF 4096
31 #else // (STM_CPU_X86)
32 #define MAX_TATAS_BACKOFF 524288
38 for (
int i = 0; i < 64; i++)
45 for (
int i = *b; i; i--)
133 while (mine->
flag) { ret++; }
143 if (mine->
next == 0) {
144 if (bcasptr(lock, mine, static_cast<mcs_qnode_t*>(NULL)))
148 while (mine->
next == 0) { }
154 #endif // LOCKS_HPP__
void spin64()
Definition: locks.hpp:36
int tatas_acquire(tatas_lock_t *lock)
Definition: locks.hpp:67
int tatas_acquire_slowpath(tatas_lock_t *lock)
Definition: locks.hpp:55
int mcs_acquire(mcs_qnode_t **lock, mcs_qnode_t *mine)
Definition: locks.hpp:122
int ticket_acquire(ticket_lock_t *lock)
Definition: locks.hpp:96
volatile uintptr_t next_ticket
Definition: locks.hpp:87
#define MAX_TATAS_BACKOFF
Definition: locks.hpp:32
void tatas_release(tatas_lock_t *lock)
Definition: locks.hpp:75
bool ret
Definition: stmskip.cc:242
volatile uintptr_t now_serving
Definition: locks.hpp:88
volatile uintptr_t tatas_lock_t
Definition: locks.hpp:52
volatile mcs_qnode_t *volatile next
Definition: locks.hpp:115
void ticket_release(ticket_lock_t *lock)
Definition: locks.hpp:106
void backoff(int *b)
Definition: locks.hpp:43
volatile bool flag
Definition: locks.hpp:114
Definition: locks.hpp:112
void mcs_release(mcs_qnode_t **lock, mcs_qnode_t *mine)
Definition: locks.hpp:139