tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stm::iccsync Namespace Reference

Classes

struct  SYNC
 
struct  SYNC< T, W, 1 >
 
struct  SYNC< T, W, 2 >
 
struct  SYNC< T, W, 4 >
 
struct  SYNC< T, 4, 8 >
 
struct  SYNC< T, 8, 8 >
 
struct  SYNC< T, 8, 16 >
 
struct  CAS_ADAPTER
 
struct  CAS_ADAPTER< T, T, 1 >
 
struct  CAS_ADAPTER< T, S, 0 >
 
struct  SWAP_ADAPTER
 
struct  SWAP_ADAPTER< T, T, 1 >
 
struct  SWAP_ADAPTER< T, S, 1 >
 
struct  SWAP_ADAPTER< T, S, 0 >
 

Functions

template<typename T , typename S >
lock_test_and_set (volatile T *address, S value)
 
template<typename T , typename S >
bool bool_compare_and_swap (volatile T *address, S from, S to)
 
template<typename T , typename S >
val_compare_and_swap (volatile T *address, S from, S to)
 
template<typename T , typename S >
fetch_and_add (volatile T *address, S value)
 

Function Documentation

template<typename T , typename S >
bool stm::iccsync::bool_compare_and_swap ( volatile T *  address,
from,
to 
)
inline

The primary interface to the bool compare-and-swap routine. Uses the parameter types to pick the correct implementation.

Here is the call graph for this function:

template<typename T , typename S >
T stm::iccsync::fetch_and_add ( volatile T *  address,
value 
)
inline

We implement fetch_and_add implemented in terms of bcas. We actually don't have a problem with the type of the value parameter, as long as the T + S operator returns a T, which it almost always will.

template<typename T , typename S >
T stm::iccsync::lock_test_and_set ( volatile T *  address,
value 
)
inline

The primary interface to the lock_test_and_set primitive. Uses the parameter types to pick the correct swap adapter.

Here is the call graph for this function:

template<typename T , typename S >
T stm::iccsync::val_compare_and_swap ( volatile T *  address,
from,
to 
)
inline

The primary interface to the val compare-and-swap routine. Uses the parameter types to pick the correct implementation.

Here is the call graph for this function: