43 SetAdaptor(uint64_t cap, uint64_t threadCount, uint32_t transSize)
45 , m_nodeAllocator(cap * threadCount * sizeof(
TransList::Node) * transSize, threadCount, sizeof(
TransList::Node))
47 , m_list(&m_nodeAllocator, &m_descAllocator, &m_nodeDescAllocator)
52 m_descAllocator.Init();
53 m_nodeAllocator.Init();
54 m_nodeDescAllocator.Init();
63 desc->
size = ops.size();
66 for(uint32_t i = 0; i < ops.size(); ++i)
68 desc->
ops[i].
type = ops[i].type;
69 desc->
ops[i].
key = ops[i].key;
72 return m_list.ExecuteOps(desc);
86 SetAdaptor(uint64_t cap, uint64_t threadCount, uint32_t transSize)
87 : m_descAllocator(cap * threadCount *
Desc::SizeOf(transSize), threadCount,
Desc::SizeOf(transSize))
88 , m_nodeDescAllocator(cap * threadCount * sizeof(
NodeDesc) * transSize, threadCount, sizeof(
NodeDesc))
101 m_descAllocator.Init();
102 m_nodeDescAllocator.Init();
113 Desc* desc = m_descAllocator.Alloc();
114 desc->
size = ops.size();
117 for(uint32_t i = 0; i < ops.size(); ++i)
119 desc->
ops[i].
type = ops[i].type;
120 desc->
ops[i].
key = ops[i].key;
170 for(uint32_t i = 0; i <
ops.size(); ++i)
172 uint32_t val =
ops[i].
key;
214 uint32_t g_count_stm_abort = 0;
277 for(uint32_t i = 0; i < ops.size(); ++i)
279 uint32_t key = ops[i].key;
281 if(ops[i].type ==
FIND)
283 ret = m_list.Find(key);
285 else if(ops[i].type ==
INSERT)
287 ret = m_list.Insert(key);
291 ret = m_list.Delete(key);
335 for(uint32_t i = 0; i < ops.size(); ++i)
337 uint32_t key = ops[i].key;
339 if(ops[i].type ==
FIND)
341 ret = m_list.Find(key);
343 else if(ops[i].type ==
INSERT)
345 ret = m_list.Insert(key);
349 ret = m_list.Delete(key);
bool ExecuteOps(const SetOpArray &ops)
Definition: setadaptor.h:110
Definition: boostinglist.h:33
BoostingList m_list
Definition: setadaptor.h:310
bool set_op ops[]
Definition: stmskip.cc:238
void Init()
Definition: setadaptor.h:233
bool stmskip_execute_ops(stm_skip *l, set_op ops[], int op_size)
Definition: setadaptor.h:29
stm_skip * m_list
Definition: setadaptor.h:247
Definition: setadaptor.h:16
Definition: boostingskip.h:37
bool ExecuteOps(const SetOpArray &ops) __attribute__((optimize(0)))
Definition: setadaptor.h:162
Definition: setadaptor.h:19
Definition: transskip.h:108
#define TM_THREAD_SHUTDOWN()
Definition: library.hpp:292
void Uninit()
Definition: setadaptor.h:326
#define TM_BEGIN(TYPE)
Definition: cxxtm.hpp:34
volatile uint8_t status
Definition: translist.h:47
~SetAdaptor()
Definition: setadaptor.h:259
SetAdaptor()
Definition: setadaptor.h:222
Definition: boostinglist.h:35
Definition: boostinglist.h:10
BoostingSkip m_list
Definition: setadaptor.h:368
Definition: setadaptor.h:15
void transskip_free(trans_skip *l)
Definition: transskip.cc:929
Allocator< NodeDesc > m_nodeDescAllocator
Definition: setadaptor.h:128
Operator ops[]
Definition: transskip.h:83
Definition: rstmlist.hpp:22
RSTMList m_list
Definition: setadaptor.h:210
volatile uint8_t status
Definition: transskip.h:81
SetAdaptor()
Definition: setadaptor.h:255
Allocator< TransList::NodeDesc > m_nodeDescAllocator
Definition: setadaptor.h:78
Definition: setadaptor.h:27
trans_skip * transskip_alloc(Allocator< Desc > *_descAllocator, Allocator< NodeDesc > *_nodeDescAllocator)
Definition: transskip.cc:331
#define TM_END
Definition: cxxtm.hpp:35
void Uninit()
Definition: setadaptor.h:105
~SetAdaptor()
Definition: setadaptor.h:94
uint32_t key
Definition: translist.h:36
static uint32_t g_count_abort
Definition: stmskip.cc:39
Allocator< Desc > m_descAllocator
Definition: setadaptor.h:127
uint8_t size
Definition: translist.h:48
std::vector< SetOperator > SetOpArray
Definition: setadaptor.h:32
void Uninit()
Definition: setadaptor.h:57
class simple_queue __attribute__
void Init()
Definition: setadaptor.h:321
uint32_t key
Definition: transskip.h:71
void destroy_transskip_subsystem(void)
Definition: transskip.cc:809
#define TM_SYS_INIT()
Definition: library.hpp:290
Operator ops[]
Definition: translist.h:49
void Init()
Definition: setadaptor.h:50
SetAdaptor()
Definition: setadaptor.h:317
void init_stmskip_subsystem(void)
Definition: stmskip.cc:289
#define TM_SYS_SHUTDOWN
Definition: library.hpp:293
uint32_t key
Definition: stmskip.h:12
void Uninit()
Definition: setadaptor.h:236
SetOpType
Definition: setadaptor.h:12
static uint32_t g_count_commit
Definition: stmskip.cc:38
SetAdaptor(uint64_t cap, uint64_t threadCount, uint32_t transSize)
Definition: setadaptor.h:43
stm_tx * tx
Definition: stmskip.cc:245
bool ret
Definition: stmskip.cc:242
void init_transskip_subsystem(void)
Definition: transskip.cc:796
bool ExecuteOps(const SetOpArray &ops)
Definition: setadaptor.h:331
#define __sync_fetch_and_add(p, a)
Definition: icc-sync.hpp:57
Definition: translist.h:39
SetOpStatus
Definition: setadaptor.h:25
void stm_skip
Definition: stmskip.h:77
#define TM_PARAM
Definition: cxxtm.hpp:42
ReturnCode
Definition: boostinglist.h:31
~SetAdaptor()
Definition: setadaptor.h:142
void Init()
Definition: setadaptor.h:263
Definition: setadaptor.h:35
~SetAdaptor()
Definition: setadaptor.h:228
#define TM_THREAD_INIT
Definition: library.hpp:291
Definition: transskip.h:74
uint32_t key
Definition: setadaptor.h:22
Definition: setadaptor.h:28
trans_skip * m_skiplist
Definition: setadaptor.h:129
Definition: translist.h:14
SetAdaptor()
Definition: setadaptor.h:137
Definition: boostingskip.h:39
bool ExecuteOps(const SetOpArray &ops)
Definition: setadaptor.h:59
Definition: transskip.h:86
uint8_t size
Definition: transskip.h:82
bool ExecuteOps(const SetOpArray &ops)
Definition: setadaptor.h:239
void Uninit()
Definition: setadaptor.h:268
TransList m_list
Definition: setadaptor.h:79
bool execute_ops(trans_skip *l, Desc *desc)
Definition: transskip.cc:909
void destory_stmskip_subsystem(void)
Definition: stmskip.cc:300
Definition: translist.h:9
void Init()
Definition: setadaptor.h:99
#define TM_GET_THREAD()
Definition: cxxtm.hpp:39
~SetAdaptor()
Definition: setadaptor.h:319
Allocator< TransList::Desc > m_descAllocator
Definition: setadaptor.h:76
uint8_t type
Definition: transskip.h:70
void Init()
Definition: setadaptor.h:149
Definition: boostingskip.h:13
bool ExecuteOps(const SetOpArray &ops)
Definition: setadaptor.h:273
ReturnCode
Definition: boostingskip.h:35
Allocator< TransList::Node > m_nodeAllocator
Definition: setadaptor.h:77
set_t * stmskip_alloc(void)
Definition: stmskip.cc:121
uint8_t type
Definition: setadaptor.h:21
Definition: setadaptor.h:14
void Uninit()
Definition: setadaptor.h:154
uint8_t type
Definition: translist.h:35
SetAdaptor(uint64_t cap, uint64_t threadCount, uint32_t transSize)
Definition: setadaptor.h:86