23#ifndef GCS_TAGGED_LOCK_INCLUDED
24#define GCS_TAGGED_LOCK_INCLUDED
85 using Tag = std::uint64_t;
127 std::memory_order order =
std::memory_order_acquire) const;
The Gcs_tagged_lock class Implements a tagged lock for optimistic read-side sections.
Definition: gcs_tagged_lock.h:83
std::uint64_t Tag
Definition: gcs_tagged_lock.h:85
bool validate_optimistic_read(Tag const &tag) const
Validates an optimistic read-side section.
Definition: gcs_tagged_lock.cc:70
std::atomic< std::uint64_t > m_lock_word
Definition: gcs_tagged_lock.h:130
void unlock()
Finishes the write-side section, i.e.
Definition: gcs_tagged_lock.cc:109
std::uint64_t get_lock_word(std::memory_order order=std::memory_order_acquire) const
Definition: gcs_tagged_lock.cc:29
Tag optimistic_read() const
Starts an optimistic read-side section.
Definition: gcs_tagged_lock.cc:43
bool is_locked() const
Checks whether the lock is currently acquired.
Definition: gcs_tagged_lock.cc:114
bool try_lock()
Attempts to start a write-side section, i.e.
Definition: gcs_tagged_lock.cc:99
Gcs_tagged_lock() noexcept
Definition: gcs_tagged_lock.cc:25
Definition: varlen_sort.h:183