Derecho  0.9
Distributed systems toolkit for RDMA
Classes | Macros | Functions
HLC.hpp File Reference
#include <inttypes.h>
#include <pthread.h>
#include <sys/types.h>
Include dependency graph for HLC.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  HLC
 

Macros

#define HLC_EXP(errcode, usercode)   ((((errcode)&0xffffffffull) << 32) | ((usercode)&0xffffffffull))
 
#define HLC_EXP_USERCODE(x)   ((uint32_t)((x)&0xffffffffull))
 
#define HLC_EXP_READ_RTC(x)   HLC_EXP(0, (x))
 
#define HLC_EXP_SPIN_INIT(x)   HLC_EXP(1, (x))
 
#define HLC_EXP_SPIN_DESTROY(x)   HLC_EXP(2, (x))
 
#define HLC_EXP_SPIN_LOCK(x)   HLC_EXP(3, (x))
 
#define HLC_EXP_SPIN_UNLOCK(x)   HLC_EXP(4, (x))
 

Functions

uint64_t read_rtc_us () noexcept(false)
 

Macro Definition Documentation

◆ HLC_EXP

#define HLC_EXP (   errcode,
  usercode 
)    ((((errcode)&0xffffffffull) << 32) | ((usercode)&0xffffffffull))

Definition at line 39 of file HLC.hpp.

◆ HLC_EXP_READ_RTC

#define HLC_EXP_READ_RTC (   x)    HLC_EXP(0, (x))

Definition at line 42 of file HLC.hpp.

◆ HLC_EXP_SPIN_DESTROY

#define HLC_EXP_SPIN_DESTROY (   x)    HLC_EXP(2, (x))

Definition at line 44 of file HLC.hpp.

◆ HLC_EXP_SPIN_INIT

#define HLC_EXP_SPIN_INIT (   x)    HLC_EXP(1, (x))

Definition at line 43 of file HLC.hpp.

◆ HLC_EXP_SPIN_LOCK

#define HLC_EXP_SPIN_LOCK (   x)    HLC_EXP(3, (x))

Definition at line 45 of file HLC.hpp.

◆ HLC_EXP_SPIN_UNLOCK

#define HLC_EXP_SPIN_UNLOCK (   x)    HLC_EXP(4, (x))

Definition at line 46 of file HLC.hpp.

◆ HLC_EXP_USERCODE

#define HLC_EXP_USERCODE (   x)    ((uint32_t)((x)&0xffffffffull))

Definition at line 41 of file HLC.hpp.

Function Documentation

◆ read_rtc_us()

uint64_t read_rtc_us ( )
noexcept

Definition at line 6 of file HLC.cpp.