tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stm_fraser.c File Reference
#include "portable_defns.h"
#include "ptst.h"
#include "gc.h"
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include <signal.h>
Include dependency graph for stm_fraser.c:

Classes

struct  stm_blk_st
 
struct  stm_tx_entry_st
 
struct  stm_tx_st
 
struct  stm_st
 
struct  priv_t
 

Macros

#define ALLOCATOR_SIZE(_s)   (do_padding ? CACHE_LINE_SIZE : (_s))
 
#define ARENA_SIZE   163840
 
#define DESCRIPTOR_SIZE   16384
 
#define TXS_IN_PROGRESS   0
 
#define TXS_READ_PHASE   1
 
#define TXS_FAILED   2
 
#define TXS_SUCCESSFUL   3
 
#define is_descriptor(_p)   ((unsigned long)(_p) & 1)
 
#define ptr_to_descriptor(_p)   ((stm_tx *)((unsigned long)(_p) & ~1))
 
#define make_marked_ptr(_p)   ((void *)((unsigned long)(_p) | 1))
 
#define read_only(_t)   ((_t)->writes == NULL)
 

Typedefs

typedef struct stm_blk_st stm_blk
 
typedef struct stm_tx_entry_st stm_tx_entry
 
typedef struct stm_tx_st stm_tx
 
typedef struct stm_st stm
 

Functions

bool_t commit_stm_tx (ptst_t *ptst, stm_tx *t)
 
static void new_arena (priv_t *priv, int size)
 
static void release_descriptor (ptst_t *ptst, stm_tx *t)
 
static int rc_delta_descriptor (stm_tx *t, int delta)
 
static void rc_up_descriptor (stm_tx *t)
 
static void rc_down_descriptor (ptst_t *ptst, stm_tx *t)
 
static stm_txnew_descriptor (priv_t *priv)
 
static stm_tx_entryalloc_stm_tx_entry (stm_tx *t)
 
static stm_tx_entry ** search_stm_tx_entry (stm_tx_entry **pnext, stm_blk *b)
 
static void * read_blk_data (ptst_t *ptst, stm_blk *b)
 
stmnew_stm (ptst_t *ptst, int blk_size)
 
void free_stm (ptst_t *ptst, stm *mem)
 
stm_blknew_stm_blk (ptst_t *ptst, stm *mem)
 
void free_stm_blk (ptst_t *ptst, stm *mem, stm_blk *b)
 
void * init_stm_blk (ptst_t *ptst, stm *mem, stm_blk *b)
 
int sizeof_stm_blk (ptst_t *ptst, stm *mem, stm_blk *b)
 
stm_txnew_stm_tx (ptst_t *ptst, stm *mem, sigjmp_buf *penv)
 
bool_t validate_stm_tx (ptst_t *ptst, stm_tx *t)
 
void abort_stm_tx (ptst_t *ptst, stm_tx *t)
 
void * read_stm_blk (ptst_t *ptst, stm_tx *t, stm_blk *b)
 
void * write_stm_blk (ptst_t *ptst, stm_tx *t, stm_blk *b)
 
void remove_from_tx (ptst_t *ptst, stm_tx *t, stm_blk *b)
 
static void handle_fault (int sig)
 
void _init_stm_subsystem (int pad_data)
 

Variables

static priv_t priv_ptst [MAX_THREADS]
 
static int gc_blk_id
 
static int do_padding
 

Macro Definition Documentation

#define ALLOCATOR_SIZE (   _s)    (do_padding ? CACHE_LINE_SIZE : (_s))
#define ARENA_SIZE   163840
#define DESCRIPTOR_SIZE   16384
#define is_descriptor (   _p)    ((unsigned long)(_p) & 1)
#define make_marked_ptr (   _p)    ((void *)((unsigned long)(_p) | 1))
#define ptr_to_descriptor (   _p)    ((stm_tx *)((unsigned long)(_p) & ~1))
#define read_only (   _t)    ((_t)->writes == NULL)
#define TXS_FAILED   2
#define TXS_IN_PROGRESS   0
#define TXS_READ_PHASE   1
#define TXS_SUCCESSFUL   3

Typedef Documentation

typedef struct stm_st stm
typedef struct stm_blk_st stm_blk
typedef struct stm_tx_st stm_tx
typedef struct stm_tx_entry_st stm_tx_entry

Function Documentation

void _init_stm_subsystem ( int  pad_data)

Here is the call graph for this function:

Here is the caller graph for this function:

void abort_stm_tx ( ptst_t ptst,
stm_tx t 
)

Here is the caller graph for this function:

static stm_tx_entry* alloc_stm_tx_entry ( stm_tx t)
static

Here is the caller graph for this function:

bool_t commit_stm_tx ( ptst_t ptst,
stm_tx t 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void free_stm ( ptst_t ptst,
stm mem 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void free_stm_blk ( ptst_t ptst,
stm mem,
stm_blk b 
)

Here is the call graph for this function:

static void handle_fault ( int  sig)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void* init_stm_blk ( ptst_t ptst,
stm mem,
stm_blk b 
)

Here is the caller graph for this function:

static void new_arena ( priv_t priv,
int  size 
)
static

Here is the caller graph for this function:

static stm_tx* new_descriptor ( priv_t priv)
static

Here is the call graph for this function:

Here is the caller graph for this function:

stm* new_stm ( ptst_t ptst,
int  blk_size 
)

Here is the call graph for this function:

Here is the caller graph for this function:

stm_blk* new_stm_blk ( ptst_t ptst,
stm mem 
)

Here is the call graph for this function:

Here is the caller graph for this function:

stm_tx* new_stm_tx ( ptst_t ptst,
stm mem,
sigjmp_buf *  penv 
)

Here is the call graph for this function:

static int rc_delta_descriptor ( stm_tx t,
int  delta 
)
static

Here is the caller graph for this function:

static void rc_down_descriptor ( ptst_t ptst,
stm_tx t 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void rc_up_descriptor ( stm_tx t)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void* read_blk_data ( ptst_t ptst,
stm_blk b 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void* read_stm_blk ( ptst_t ptst,
stm_tx t,
stm_blk b 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static void release_descriptor ( ptst_t ptst,
stm_tx t 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void remove_from_tx ( ptst_t ptst,
stm_tx t,
stm_blk b 
)

Here is the call graph for this function:

static stm_tx_entry** search_stm_tx_entry ( stm_tx_entry **  pnext,
stm_blk b 
)
static

Here is the caller graph for this function:

int sizeof_stm_blk ( ptst_t ptst,
stm mem,
stm_blk b 
)
bool_t validate_stm_tx ( ptst_t ptst,
stm_tx t 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void* write_stm_blk ( ptst_t ptst,
stm_tx t,
stm_blk b 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int do_padding
static
int gc_blk_id
static
priv_t priv_ptst[MAX_THREADS]
static