tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
itm2stm::Scope::LoggedWord Struct Reference
Collaboration diagram for itm2stm::Scope::LoggedWord:

Public Member Functions

 LoggedWord (void **addr, void *val, size_t bytes)
 
void ** begin () const
 
void ** end () const
 
void undo (ThrownObject &, void **protected_stack_lower_bound)
 

Private Member Functions

void clip (void **lower, void **upper)
 

Private Attributes

void ** address_
 
void * value_
 
size_t bytes_
 

Detailed Description

ITM will sometimes want to log a thread-local value, but instead of using stack-space and well-known control flow, it will ask the library to perform the logging on its behalf. We could simply use existing transactional metadata structures to log them, but these logged values do not need conflict detection, and we don't expect them to be common. For this reason, we do simple logging in the shim, and undo the logged values during rollback.

We log in word-sized maximum chunks. These are not assumed to have any specific alignment.

Constructor & Destructor Documentation

itm2stm::Scope::LoggedWord::LoggedWord ( void **  addr,
void *  val,
size_t  bytes 
)
inline

Member Function Documentation

void ** Scope::LoggedWord::begin ( ) const
inline
void Scope::LoggedWord::clip ( void **  lower,
void **  upper 
)
inlineprivate

The clip routine is used to protect against undoing to both thrown objects and the protected stack. We aren't capable of undoing to a discontinuous range (i.e., if the logged value is larger than the range, and the range is completely contained withing the logged address range, and there is some "left-over" space on each side).

The range is [lower, upper)

Here is the call graph for this function:

void ** Scope::LoggedWord::end ( ) const
inline
void Scope::LoggedWord::undo ( ThrownObject thrown,
void **  protected_stack_lower_bound 
)
inline

Here is the call graph for this function:

Member Data Documentation

void** itm2stm::Scope::LoggedWord::address_
private
size_t itm2stm::Scope::LoggedWord::bytes_
private
void* itm2stm::Scope::LoggedWord::value_
private

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