Tervel  1.0.0
A collection of wait-free containers and algorithms.
Namespaces | Functions
descriptor_util.h File Reference
#include <tervel/util/info.h>
#include <tervel/util/descriptor.h>
#include <tervel/util/recursive_action.h>
#include <tervel/util/memory/rc/pool_element.h>
#include <tervel/util/memory/rc/descriptor_pool.h>
#include <tervel/util/progress_assurance.h>
#include <tervel/util/memory/rc/descriptor_read_first_op.h>

Go to the source code of this file.

Namespaces

 tervel
 TODO(steven):
 
 tervel::util
 
 tervel::util::memory
 
 tervel::util::memory::rc
 

Functions

template<typename DescrType , typename... Args >
DescrType * tervel::util::memory::rc::get_descriptor (Args &&...args)
 Constructs and returns a descriptor. More...
 
void tervel::util::memory::rc::free_descriptor (tervel::util::Descriptor *descr, bool dont_check=false)
 Once a user is done with a descriptor, they should free it with this method. More...
 
bool tervel::util::memory::rc::is_watched (tervel::util::Descriptor *descr)
 This method is used to determine if the passed descriptor is under rc protection. More...
 
bool tervel::util::memory::rc::watch (tervel::util::Descriptor *descr, std::atomic< void * > *address, void *value)
 This method is used to increment the reference count of the passed descriptor object. More...
 
void tervel::util::memory::rc::unwatch (tervel::util::Descriptor *descr)
 This method is used to decrement the reference count of the passed descriptor object. More...
 
void * tervel::util::memory::rc::mark_first (tervel::util::Descriptor *descr)
 This returns the passed reference with its least signifcant bit set to 1. More...
 
void tervel::util::memory::rc::atomic_mark_first (std::atomic< void * > *address)
 This function atomically bit marks the value at address. More...
 
tervel::util::Descriptortervel::util::memory::rc::unmark_first (void *descr)
 This returns an unbitmarked reference. More...
 
bool tervel::util::memory::rc::is_descriptor_first (void *descr)
 This returns whether or not the least significant bit holds a bitmark. More...
 
void * tervel::util::memory::rc::remove_descriptor (void *expected, std::atomic< void * > *address)
 This method is used to remove a descriptor object that is conflict with another threads operation. More...
 
void * tervel::util::memory::rc::descriptor_read_first (std::atomic< void * > *address)
 This function determines the logical value of an address which may have either a RC descriptor or a normal value. More...