The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PcTscClock::MonotonicPublication Class Reference

#include <TscClock.h>

+ Collaboration diagram for PcTscClock::MonotonicPublication:

Public Member Functions

 MonotonicPublication (uint64_t value=0)
 
uint64_t publish (uint64_t candidate)
 
uint64_t value () const
 
void reset (uint64_t value=0)
 

Private Member Functions

 MonotonicPublication (const MonotonicPublication &)=delete
 
MonotonicPublication & operator= (const MonotonicPublication &)=delete
 

Private Attributes

uint64_t m_Value
 

Detailed Description

Publishes a global monotonic floor with at most one compare-exchange.

A failed exchange returns the value which won the race. The unpublished candidate is sampled again by the next clock read rather than making a hard interrupt spin on a contended cache line.

Definition at line 105 of file TscClock.h.

Constructor & Destructor Documentation

◆ MonotonicPublication()

PcTscClock::MonotonicPublication::MonotonicPublication ( uint64_t  value = 0)
inlineexplicit

Definition at line 107 of file TscClock.h.

Member Function Documentation

◆ publish()

uint64_t PcTscClock::MonotonicPublication::publish ( uint64_t  candidate)
inline

Definition at line 109 of file TscClock.h.

◆ reset()

void PcTscClock::MonotonicPublication::reset ( uint64_t  value = 0)
inline

Definition at line 125 of file TscClock.h.

◆ value()

uint64_t PcTscClock::MonotonicPublication::value ( ) const
inline

Definition at line 121 of file TscClock.h.

Member Data Documentation

◆ m_Value

uint64_t PcTscClock::MonotonicPublication::m_Value
private

Definition at line 130 of file TscClock.h.


The documentation for this class was generated from the following file: