Tervel  1.0.0
A collection of wait-free containers and algorithms.
Namespaces | Classes | Functions
tervel::util Namespace Reference

Namespaces

 memory
 

Classes

class  Descriptor
 This defines the Descriptor class, this class is designed to be extend and be used in conjunction with primarily the RC memory pool objects. More...
 
class  OpRecord
 This class is used to create Operation Records. More...
 
class  PaddedAtomic
 
class  ProgressAssurance
 This class represents the progress assurance scheme employed by our library. More...
 
class  RecursiveAction
 Helper class for RAII management of recursive helping of threads. More...
 

Functions

int round_to_next_power_of_two (uint64_t value)
 Returns the next power of two. More...
 
bool isValid (void *value)
 Returns whether or not the passed value is has one of the reserved bits set to 1. More...
 
void backoff (int duration=TERVEL_DEF_BACKOFF_TIME_NS)
 Sets the amount of time in nano-seconds for a thread to backoff before re-retrying. More...
 

Function Documentation

void tervel::util::backoff ( int  duration = TERVEL_DEF_BACKOFF_TIME_NS)
inline

Sets the amount of time in nano-seconds for a thread to backoff before re-retrying.

Sets the amount of time in nano-seconds for a thread to backoff before re-retrying.

Parameters
durationduration
bool tervel::util::isValid ( void *  value)
inline

Returns whether or not the passed value is has one of the reserved bits set to 1.

Returns whether or not the passed value is has one of the reserved bits set to 1.

Parameters
valuethe value to check
Returns
whether or not value is valid
int tervel::util::round_to_next_power_of_two ( uint64_t  value)
inline

Returns the next power of two.

Returns the next power of two, if a power of two is passed, then that value is returned

TODO(steven): replace with a bit function

Parameters
valuethe value to find the next power of two
Returns
the next power of two