8 #include <MUTrace/mutrace.h> 9 #endif // MUTRACE_ENABLED_H 33 #if SIZEOF_PTHREAD_T == 8 35 #elif SIZEOF_PTHREAD_T == 0 36 #error Configuration could not determine size of pthread_t. Fix configure.ac. 38 #error Configuration determined size of pthread_t is unexpected. Fix sthread.h. 42 volatile holder_type_t _holder;
45 #ifdef MUTRACE_ENABLED_H 46 MUTRACE_PROFILE_MUTEX_CONSTRUCTOR(
tatas_lock) { _holder.bits=NOBODY; }
50 _holder.bits = NOBODY;
59 while (*&(_holder.handle)) {}
65 holder_type_t tid = {pthread_self()};
67 uint64_t old_holder = NOBODY;
77 #ifdef MUTRACE_ENABLED_H 85 holder_type_t tid = {pthread_self()};
86 uint64_t old_holder = NOBODY;
97 #ifdef MUTRACE_ENABLED_H 106 _holder.bits = NOBODY;
107 #if W_DEBUG_LEVEL > 0 118 pthread_equal(_holder.handle, pthread_self()) ?
true :
false;
void atomic_thread_fence(memory_order order)
Definition: AtomicCounter.hpp:223
bool is_mine() const
True if this thread is the lock holder.
Definition: tatas.h:116
void acquire()
Acquire the lock, spinning as long as necessary.
Definition: tatas.h:81
#define w_assert1(x)
Level 1 should not add significant extra time.
Definition: w_base.h:198
const size_t CACHELINE_TATAS_PADDING
Definition: tatas.h:140
tatas_lock * _lock
Definition: tatas.h:136
Header file for lintel::Atomic class.
~tataslock_critical_section()
Definition: tatas.h:131
void release()
Release the lock.
Definition: tatas.h:101
void spin()
spin until lock is free
Definition: tatas.h:58
tatas_lock()
Definition: tatas.h:49
A test-and-test-and-set spinlock.
Definition: tatas.h:25
Definition: AtomicCounter.hpp:114
bool try_lock()
Try to acquire the lock immediately.
Definition: tatas.h:64
tataslock_critical_section(tatas_lock *lock)
Definition: tatas.h:127
bool atomic_compare_exchange_strong(T *object, T *expected, C desired)
Definition: AtomicCounter.hpp:401
Definition: AtomicCounter.hpp:113
const size_t CACHELINE_SIZE
CPU Cache line size in bytes.
Definition: w_defines.h:183