24#ifndef GCS_TAGGED_LOCK_INCLUDED
25#define GCS_TAGGED_LOCK_INCLUDED
86 using Tag = std::uint64_t;
128 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:84
std::uint64_t Tag
Definition: gcs_tagged_lock.h:86
bool validate_optimistic_read(Tag const &tag) const
Validates an optimistic read-side section.
Definition: gcs_tagged_lock.cc:71
std::atomic< std::uint64_t > m_lock_word
Definition: gcs_tagged_lock.h:131
void unlock()
Finishes the write-side section, i.e.
Definition: gcs_tagged_lock.cc:110
std::uint64_t get_lock_word(std::memory_order order=std::memory_order_acquire) const
Definition: gcs_tagged_lock.cc:30
Tag optimistic_read() const
Starts an optimistic read-side section.
Definition: gcs_tagged_lock.cc:44
bool is_locked() const
Checks whether the lock is currently acquired.
Definition: gcs_tagged_lock.cc:115
bool try_lock()
Attempts to start a write-side section, i.e.
Definition: gcs_tagged_lock.cc:100
Gcs_tagged_lock() noexcept
Definition: gcs_tagged_lock.cc:26
Definition: gcs_xcom_synode.h:64