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

#include <WriteSet.hpp>

Collaboration diagram for stm::WordLoggingWriteSetEntry:

Public Member Functions

 WordLoggingWriteSetEntry (void **paddr, void *pval)
 
void update (const WordLoggingWriteSetEntry &rhs)
 
bool filter (void **lower, void **upper)
 
void writeback () const
 
void rollback (void **lower, void **upper)
 

Public Attributes

void ** addr
 
void * val
 

Detailed Description

The WriteSet implementation is heavily influenced by the configuration parameters, STM_WS_(WORD/BYTE)LOG, STM_PROTECT_STACK, and STM_ABORT_ON_THROW. This means that much of this file is ifdeffed accordingly. The log entry type when we're word-logging is pretty trivial, and just logs address/value pairs.

Constructor & Destructor Documentation

stm::WordLoggingWriteSetEntry::WordLoggingWriteSetEntry ( void **  paddr,
void *  pval 
)
inline

Member Function Documentation

bool stm::WordLoggingWriteSetEntry::filter ( void **  lower,
void **  upper 
)
inline

Check to see if the entry is completely contained within the given address range. We have some preconditions here w.r.t. alignment and size of the range. It has to be at least word aligned and word sized. This is currently only used with stack addresses, so we don't include asserts because we don't want to pay for them in the common case writeback loop.

void stm::WordLoggingWriteSetEntry::rollback ( void **  lower,
void **  upper 
)
inline

Called during rollback if there is an exception object that we need to perform writes to. The address range is the range of addresses that we're looking for. If this log entry is contained in the range, we perform the writeback.

NB: We're assuming a pretty well defined address range, in terms of size and alignment here, because the word-based writeset can only handle word-sized data.

Here is the call graph for this function:

void stm::WordLoggingWriteSetEntry::update ( const WordLoggingWriteSetEntry rhs)
inline

Called when we are WAW an address, and we want to coalesce the write. Trivial for the word-based writeset, but complicated for the byte-based version.

void stm::WordLoggingWriteSetEntry::writeback ( ) const
inline

Called during writeback to actually perform the logged write. This is trivial for the word-based set, but the byte-based set is more complicated.

Here is the caller graph for this function:

Member Data Documentation

void** stm::WordLoggingWriteSetEntry::addr
void* stm::WordLoggingWriteSetEntry::val

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