RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions
Datacratic::GcLockBase::Data Struct Reference

List of all members.

Public Types

typedef uint64_t q2 __attribute__ ((__vector_size__(16)))

Public Member Functions

 Data (const Data &other)
Dataoperator= (const Data &other)
union {
   struct {
      int32_t   epoch
 Current epoch number (could be smaller).
      int16_t   in [2]
 How many threads in each epoch.
      int32_t   visibleEpoch
 Lowest epoch number that's visible.
      int32_t   exclusive
 Mutex value to lock exclusively.
   }   JML_ALIGNED
   struct {
      uint64_t   bits
      uint64_t   bits2
   } 
   struct {
      q2   q
   } 
JML_ALIGNED (16)
int16_t inCurrent () const
int16_t inOld () const
void setIn (int32_t epoch, int val)
void addIn (int32_t epoch, int val)
void validate () const
bool calcVisibleEpoch ()
std::string print () const
bool operator== (const Data &other) const
bool operator!= (const Data &other) const

Detailed Description

Definition at line 56 of file gc_lock.h.


Member Function Documentation

Calculate the appropriate value of visibleEpoch from the rest of the fields. Returns true if waiters should be woken up.

Definition at line 296 of file gc_lock.cc.

std::string Datacratic::GcLockBase::Data::print ( ) const

Human readable string.

Definition at line 322 of file gc_lock.cc.

Check that the invariants all hold. Throws an exception if not.

Definition at line 271 of file gc_lock.cc.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator