tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
locks.hpp File Reference
Include dependency graph for locks.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ticket_lock_t
 
struct  mcs_qnode_t
 

Macros

#define MAX_TATAS_BACKOFF   524288
 

Typedefs

typedef volatile uintptr_t tatas_lock_t
 

Functions

void spin64 ()
 
void backoff (int *b)
 
int tatas_acquire_slowpath (tatas_lock_t *lock)
 
int tatas_acquire (tatas_lock_t *lock)
 
void tatas_release (tatas_lock_t *lock)
 
int ticket_acquire (ticket_lock_t *lock)
 
void ticket_release (ticket_lock_t *lock)
 
int mcs_acquire (mcs_qnode_t **lock, mcs_qnode_t *mine)
 
void mcs_release (mcs_qnode_t **lock, mcs_qnode_t *mine)
 

Macro Definition Documentation

#define MAX_TATAS_BACKOFF   524288

Copyright (C) 2011 University of Rochester Department of Computer Science and Lehigh University Department of Computer Science and Engineering

License: Modified BSD Please see the file LICENSE.RSTM for licensing information Given all the atomic operations we defined in platform.hpp, we can now declare the lock types that we need for implementing some single-lock based STMs. Tune backoff parameters

NB: At some point (probably mid 2010), these values were experimentally verified to provide good performance for some workload using TATAS locks. Whether they are good values anymore is an open question.

Typedef Documentation

typedef volatile uintptr_t tatas_lock_t

Function Documentation

void backoff ( int *  b)
inline

Here is the caller graph for this function:

int mcs_acquire ( mcs_qnode_t **  lock,
mcs_qnode_t mine 
)
inline

MCS acquire. We count how long we spin, in order to detect very long delays

void mcs_release ( mcs_qnode_t **  lock,
mcs_qnode_t mine 
)
inline
void spin64 ( )
inline

Here is the caller graph for this function:

int tatas_acquire ( tatas_lock_t lock)
inline

Fastpath TATAS acquire. The return value is how long we spent spinning

Here is the call graph for this function:

Here is the caller graph for this function:

int tatas_acquire_slowpath ( tatas_lock_t lock)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void tatas_release ( tatas_lock_t lock)
inline
int ticket_acquire ( ticket_lock_t lock)
inline

Acquisition of a ticket lock entails an increment, then a spin. We use a counter to measure how long we spend spinning, in case that information is useful to adaptive STM mechanisms.

void ticket_release ( ticket_lock_t lock)
inline