69 inline bool lock (uintptr_t thinlock);
78 inline void set(uintptr_t lockword);
137 return Lockword(oldlockword).is_unlocked();
215 #endif // _LOCKWORD_HPP
Lockword(uintptr_t &lockword)
T compare_and_swap(T *p, T o, T n)
void set(uintptr_t lockword)
static const int THIN_LOCK_COUNT_MASK
static const int THIN_LOCK_SHAPE_BIT
static uintptr_t pre_compute_thinlock(int32_t index)
Pre-compute the thin lock value for a thread index.
void unlock()
Set the lockword to THIN_UNLOCKED.
void decrease_thin_lock_count()
int32_t get_thin_lock_thread_index() const
static const uintptr_t THIN_UNLOCKED
int32_t get_thin_lock_count() const
static const int THIN_LOCK_WORD_SIZE
uintptr_t get_thin_lock_without_count() const
bool lock(uintptr_t thinlock)
Try to lock the lockword with the given thin-lock value.
bool is_thin_lock() const
void increase_thin_lock_count()
bool is_max_thin_lock_count() const
static const int THIN_LOCK_COUNT_SIZE
static const int THIN_LOCK_TID_SIZE
static const int THIN_LOCK_COUNT_SHIFT
bool is_unlocked() const
Check if the lockword is an unlocked thin-lock.
static const int THIN_LOCK_TID_SHIFT
static const int THIN_LOCK_COUNT_INCR
static const int THIN_LOCK_COUNT_MAX
void inflate(struct lock_record_t *lr)
Inflate the lock of the given object.
struct lock_record_t * get_fat_lock() const
uintptr_t get_thin_lock() const