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

#include <WBMMPolicy.hpp>

Collaboration diagram for stm::WBMMPolicy:

Public Member Functions

 WBMMPolicy ()
 
void setID (uint32_t id)
 
void * txAlloc (size_t const &size)
 
void txFree (void *ptr)
 
void onTxBegin ()
 
void onTxAbort ()
 
void onTxCommit ()
 

Private Member Functions

void schedForReclaim (void *ptr)
 
NOINLINE void handle_full_prelimbo ()
 

Private Attributes

volatile uintptr_t * my_ts
 
limbo_tprelimbo
 
limbo_tlimbo
 
AddressList frees
 
AddressList allocs
 

Detailed Description

WBMMPolicy

  • log allocs and frees from within a transaction
  • on abort, free any allocs
  • on commit, replay any frees
  • use epochs to prevent reclamation during a doomed transaction's execution

Constructor & Destructor Documentation

stm::WBMMPolicy::WBMMPolicy ( )
inline

Constructing the DeferredReclamationMMPolicy is very easy Null out the timestamp for a particular thread. We only call this at initialization.

Member Function Documentation

void WBMMPolicy::handle_full_prelimbo ( )
private

This code is the cornerstone of the WBMMPolicy. We buffer lots of frees onto a prelimbo list, and then, at some point, we must give that list a timestamp and tuck it away until the timestamp expires. This is how we do it.

Here is the call graph for this function:

Here is the caller graph for this function:

void stm::WBMMPolicy::onTxAbort ( )
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void stm::WBMMPolicy::onTxBegin ( )
inline

Here is the caller graph for this function:

void stm::WBMMPolicy::onTxCommit ( )
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void stm::WBMMPolicy::schedForReclaim ( void *  ptr)
inlineprivate

Schedule a pointer for reclamation. Reclamation will not happen until enough time has passed.

Here is the call graph for this function:

Here is the caller graph for this function:

void stm::WBMMPolicy::setID ( uint32_t  id)
inline

Since a TxThread constructs its allocator before it gets its id, we need the TxThread to inform the allocator of its id from within the constructor, via this method.

void* stm::WBMMPolicy::txAlloc ( size_t const &  size)
inline

Here is the call graph for this function:

void stm::WBMMPolicy::txFree ( void *  ptr)
inline

Here is the call graph for this function:

Member Data Documentation

AddressList stm::WBMMPolicy::allocs
private
AddressList stm::WBMMPolicy::frees
private
limbo_t* stm::WBMMPolicy::limbo
private
volatile uintptr_t* stm::WBMMPolicy::my_ts
private
limbo_t* stm::WBMMPolicy::prelimbo
private

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