tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
transskip.cc File Reference
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <vector>
#include "common/fraser/portable_defns.h"
#include "common/fraser/ptst.h"
#include "transskip.h"
Include dependency graph for transskip.cc:

Classes

struct  HelpStack
 

Macros

#define __SET_IMPLEMENTATION__
 
#define SET_MARK(_p)   ((node_t *)(((uintptr_t)(_p)) | 1))
 
#define CLR_MARKD(_p)   ((NodeDesc *)(((uintptr_t)(_p)) & ~1))
 
#define IS_MARKED(_p)   (((uintptr_t)(_p)) & 1)
 

Enumerations

enum  OpStatus { LIVE = 0, COMMITTED, ABORTED }
 
enum  OpType { FIND = 0, INSERT, DELETE }
 

Functions

static bool help_ops (trans_skip *l, Desc *desc, uint8_t opid)
 
static bool FinishPendingTxn (trans_skip *l, NodeDesc *nodeDesc, Desc *desc)
 
static bool IsNodeActive (NodeDesc *nodeDesc)
 
static bool IsKeyExist (NodeDesc *nodeDesc)
 
static bool IsSameOperation (NodeDesc *nodeDesc1, NodeDesc *nodeDesc2)
 
static int get_level (ptst_t *ptst)
 
static node_talloc_node (ptst_t *ptst)
 
static void free_node (ptst_t *ptst, node_t *n)
 
static node_tstrong_search_predecessors (trans_skip *l, setkey_t k, node_t **pa, node_t **na)
 
static node_tweak_search_predecessors (trans_skip *l, setkey_t k, node_t **pa, node_t **na)
 
static void mark_deleted (node_t *x, int level)
 
static int check_for_full_delete (node_t *x)
 
static void do_full_delete (ptst_t *ptst, trans_skip *l, node_t *x, int level)
 
trans_skiptransskip_alloc (Allocator< Desc > *_descAllocator, Allocator< NodeDesc > *_nodeDescAllocator)
 
bool transskip_insert (trans_skip *l, setkey_t k, Desc *desc, uint8_t opid, node_t *&n)
 
bool transskip_delete (trans_skip *l, setkey_t k, Desc *desc, uint8_t opid, node_t *&n)
 
setval_t transskip_delete_org (trans_skip *l, setkey_t k)
 
bool transskip_find (trans_skip *l, setkey_t k, Desc *desc, uint8_t opid)
 
setval_t transskip_find_original (trans_skip *l, setkey_t k)
 
void init_transskip_subsystem (void)
 
void destroy_transskip_subsystem (void)
 
bool execute_ops (trans_skip *l, Desc *desc)
 
void transskip_print (trans_skip *l)
 
void transskip_free (trans_skip *l)
 

Variables

static __thread HelpStack helpStack
 
static int gc_id [NUM_LEVELS]
 
static uint32_t g_count_commit = 0
 
static uint32_t g_count_abort = 0
 
static uint32_t g_count_fake_abort = 0
 

Macro Definition Documentation

#define __SET_IMPLEMENTATION__
#define CLR_MARKD (   _p)    ((NodeDesc *)(((uintptr_t)(_p)) & ~1))
#define IS_MARKED (   _p)    (((uintptr_t)(_p)) & 1)
#define SET_MARK (   _p)    ((node_t *)(((uintptr_t)(_p)) | 1))

Enumeration Type Documentation

enum OpStatus
Enumerator
LIVE 
COMMITTED 
ABORTED 
enum OpType
Enumerator
FIND 
INSERT 
DELETE 

Function Documentation

static node_t* alloc_node ( ptst_t ptst)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int check_for_full_delete ( node_t x)
static

Here is the caller graph for this function:

void destroy_transskip_subsystem ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

static void do_full_delete ( ptst_t ptst,
trans_skip l,
node_t x,
int  level 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

bool execute_ops ( trans_skip l,
Desc desc 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static bool FinishPendingTxn ( trans_skip l,
NodeDesc nodeDesc,
Desc desc 
)
inlinestatic

Here is the call graph for this function:

Here is the caller graph for this function:

static void free_node ( ptst_t ptst,
node_t n 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int get_level ( ptst_t ptst)
static

Here is the caller graph for this function:

static bool help_ops ( trans_skip l,
Desc desc,
uint8_t  opid 
)
inlinestatic

Here is the call graph for this function:

Here is the caller graph for this function:

void init_transskip_subsystem ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

static bool IsKeyExist ( NodeDesc nodeDesc)
inlinestatic

Here is the call graph for this function:

Here is the caller graph for this function:

static bool IsNodeActive ( NodeDesc nodeDesc)
inlinestatic

Here is the caller graph for this function:

static bool IsSameOperation ( NodeDesc nodeDesc1,
NodeDesc nodeDesc2 
)
inlinestatic

Here is the caller graph for this function:

static void mark_deleted ( node_t x,
int  level 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static node_t* strong_search_predecessors ( trans_skip l,
setkey_t  k,
node_t **  pa,
node_t **  na 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

trans_skip* transskip_alloc ( Allocator< Desc > *  _descAllocator,
Allocator< NodeDesc > *  _nodeDescAllocator 
)

Here is the caller graph for this function:

bool transskip_delete ( trans_skip l,
setkey_t  k,
Desc desc,
uint8_t  opid,
node_t *&  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

setval_t transskip_delete_org ( trans_skip l,
setkey_t  k 
)

Here is the call graph for this function:

bool transskip_find ( trans_skip l,
setkey_t  k,
Desc desc,
uint8_t  opid 
)

Here is the call graph for this function:

Here is the caller graph for this function:

setval_t transskip_find_original ( trans_skip l,
setkey_t  k 
)

Here is the call graph for this function:

void transskip_free ( trans_skip l)

Here is the caller graph for this function:

bool transskip_insert ( trans_skip l,
setkey_t  k,
Desc desc,
uint8_t  opid,
node_t *&  n 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void transskip_print ( trans_skip l)

Here is the call graph for this function:

static node_t* weak_search_predecessors ( trans_skip l,
setkey_t  k,
node_t **  pa,
node_t **  na 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

uint32_t g_count_abort = 0
static
uint32_t g_count_commit = 0
static
uint32_t g_count_fake_abort = 0
static
int gc_id[NUM_LEVELS]
static
__thread HelpStack helpStack
static