tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stm::iccsync::CAS_ADAPTER< T, S, D > Struct Template Reference

#include <icc-sync.hpp>

Collaboration diagram for stm::iccsync::CAS_ADAPTER< T, S, D >:

Static Public Member Functions

static T cas (volatile T *address, S from, S to)
 
static bool bcas (volatile T *address, S from, S to)
 

Detailed Description

template<typename T, typename S, size_t D = sizeof(T) / sizeof(S)>
struct stm::iccsync::CAS_ADAPTER< T, S, D >

We're really liberal with the types of the parameters that we pass to the sync builtins. Apparently, gcc is fine with this, and "does the right thing" for them. Our SYNC interface, on the other hand, is really picky about type matching. This CAS_ADAPTER does the type matching that we need for our stm usage. This matches whenever T and S are different, and the value we're casting in may be smaller than the value we're casting to. This works because we've specialized for T == S, and for S > T.

Member Function Documentation

template<typename T , typename S , size_t D = sizeof(T) / sizeof(S)>
static bool stm::iccsync::CAS_ADAPTER< T, S, D >::bcas ( volatile T *  address,
from,
to 
)
inlinestatic

Here is the caller graph for this function:

template<typename T , typename S , size_t D = sizeof(T) / sizeof(S)>
static T stm::iccsync::CAS_ADAPTER< T, S, D >::cas ( volatile T *  address,
from,
to 
)
inlinestatic

Here is the caller graph for this function:


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