tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
algs.hpp
Go to the documentation of this file.
1 /**
2  * Copyright (C) 2011
3  * University of Rochester Department of Computer Science
4  * and
5  * Lehigh University Department of Computer Science and Engineering
6  *
7  * License: Modified BSD
8  * Please see the file LICENSE.RSTM for licensing information
9  */
10 
11 /**
12  * This file declares global metadata that is used by all STM algorithms,
13  * along with some accessor functions
14  */
15 
16 #ifndef ALGS_HPP__
17 #define ALGS_HPP__
18 
19 #include <stm/config.h>
20 #ifdef STM_CC_SUN
21 #include <stdio.h>
22 #else
23 #include <cstdio>
24 #endif
25 
26 #include "stm/metadata.hpp"
27 #include "stm/txthread.hpp"
28 #include "../profiling.hpp" // Trigger::
29 
30 namespace stm
31 {
32  /**
33  * The ALGS enum lists every STM algorithm we have
34  */
35  enum ALGS {
36  // first, list the supported STM algorithms... we need CGL to be 0, from
37  // there everything will be in-order
48  // ProfileTM support. These are not true STMs
50  // end with a distinct value
52 
53  /**
54  * These constants are used throughout the STM implementations
55  */
56  static const uint32_t NUM_STRIPES = 1048576; // number of orecs
57  static const uint32_t RING_ELEMENTS = 1024; // number of ring elements
58  static const uint32_t KARMA_FACTOR = 16; // aborts b4 incr karma
59  static const uint32_t BACKOFF_MIN = 4; // min backoff exponent
60  static const uint32_t BACKOFF_MAX = 16; // max backoff exponent
61  static const uint32_t RREC_COUNT = 1048576; // number of rrecs
62  static const uint32_t WB_CHUNK_SIZE = 16; // lf writeback chunks
63  static const uint32_t EPOCH_MAX = INT_MAX; // default epoch
64  static const uint32_t ACTIVE = 0; // transaction status
65  static const uint32_t ABORTED = 1; // transaction status
66  static const uint32_t SWISS_PHASE2 = 10; // swisstm cm phase change thresh
67 
68  /**
69  * These global fields are used for concurrency control and conflict
70  * detection in our STM systems
71  */
72  extern pad_word_t timestamp;
73  extern orec_t orecs[NUM_STRIPES]; // set of orecs
74  extern pad_word_t last_init; // last logical commit
75  extern pad_word_t last_complete; // last physical commit
76  extern filter_t ring_wf[RING_ELEMENTS] TM_ALIGN(16); // ring of Bloom filters
77  extern pad_word_t prioTxCount; // # priority txns
78  extern rrec_t rrecs[RREC_COUNT]; // set of rrecs
79  extern bytelock_t bytelocks[NUM_STRIPES]; // set of bytelocks
80  extern bitlock_t bitlocks[NUM_STRIPES]; // set of bitlocks
81  extern pad_word_t timestamp_max; // max value of timestamp
82  extern mcs_qnode_t* mcslock; // for MCS
83  extern pad_word_t epochs[MAX_THREADS]; // for coarse-grained CM
84  extern ticket_lock_t ticketlock; // for ticket lock STM
85  extern orec_t nanorecs[RING_ELEMENTS]; // for Nano
86  extern pad_word_t greedy_ts; // for swiss cm
87  extern pad_word_t fcm_timestamp; // for FCM
88  extern dynprof_t* app_profiles; // for ProfileApp*
89 
90  // ProfileTM can't function without these
91  extern dynprof_t* profiles; // a list of ProfileTM measurements
92  extern uint32_t profile_txns; // how many txns per profile
93 
94  /**
95  * To describe an STM algorithm, we provide a name, a set of function
96  * pointers, and some other information
97  */
98  struct alg_t
99  {
100  /*** the name of this policy */
101  const char* name;
102 
103  /**
104  * the begin, commit, read, and write methods a tx uses when it
105  * starts
106  */
109  void* (*TM_FASTCALL read) (STM_READ_SIG(,,));
110  void (*TM_FASTCALL write) (STM_WRITE_SIG(,,,));
111 
112  /**
113  * rolls the transaction back without unwinding, returns the scope (which
114  * is set to null during rollback)
115  */
116  scope_t* (* rollback)(STM_ROLLBACK_SIG(,,,));
117 
118  /*** the restart, retry, and irrevoc methods to use */
119  bool (* irrevoc)(STM_IRREVOC_SIG(,));
120 
121  /*** the code to run when switching to this alg */
122  void (* switcher) ();
123 
124  /**
125  * bool flag to indicate if an algorithm is privatization safe
126  *
127  * NB: we should probably track levels of publication safety too, but
128  * we don't
129  */
131 
132  /*** simple ctor, because a NULL name is a bad thing */
133  alg_t() : name("") { }
134  };
135 
136  /**
137  * These simple functions are used for common operations on the global
138  * metadata arrays
139  */
140 
141  /**
142  * Map addresses to orec table entries
143  */
144  TM_INLINE
145  inline orec_t* get_orec(void* addr)
146  {
147  uintptr_t index = reinterpret_cast<uintptr_t>(addr);
148  return &orecs[(index>>3) % NUM_STRIPES];
149  }
150 
151  /**
152  * Map addresses to nanorec table entries
153  */
154  TM_INLINE
155  inline orec_t* get_nanorec(void* addr)
156  {
157  uintptr_t index = reinterpret_cast<uintptr_t>(addr);
158  return &nanorecs[(index>>3) % RING_ELEMENTS];
159  }
160 
161  /**
162  * Map addresses to rrec table entries
163  */
164  TM_INLINE
165  inline rrec_t* get_rrec(void* addr)
166  {
167  uintptr_t index = reinterpret_cast<uintptr_t>(addr);
168  return &rrecs[(index>>3)%RREC_COUNT];
169  }
170 
171  /**
172  * Map addresses to bytelock table entries
173  */
174  TM_INLINE
175  inline bytelock_t* get_bytelock(void* addr)
176  {
177  uintptr_t index = reinterpret_cast<uintptr_t>(addr);
178  return &bytelocks[(index>>3) % NUM_STRIPES];
179  }
180 
181  /**
182  * Map addresses to bitlock table entries
183  */
184  TM_INLINE
185  inline bitlock_t* get_bitlock(void* addr)
186  {
187  uintptr_t index = reinterpret_cast<uintptr_t>(addr);
188  return &bitlocks[(index>>3) % NUM_STRIPES];
189  }
190 
191  /**
192  * We don't want to have to declare an init function for each of the STM
193  * algorithms that exist, because there are very many of them and they vary
194  * dynamically. Instead, we have a templated init function in namespace stm,
195  * and we instantiate it once per algorithm, in the algorithm's .cpp, using
196  * the ALGS enum. Then we can just call the templated functions from this
197  * code, and the linker will find the corresponding instantiation.
198  */
199  template <int I>
200  void initTM();
201 
202  /**
203  * These describe all our STM algorithms and adaptivity policies
204  */
205  extern alg_t stms[ALG_MAX];
206 
207  /*** Get an ENUM value from a string TM name */
208  int32_t stm_name_map(const char*);
209 
210  /**
211  * A simple implementation of randomized exponential backoff.
212  *
213  * NB: This uses getElapsedTime, which is slow compared to a granularity
214  * of 64 nops. However, we can't switch to tick(), because sometimes
215  * two successive tick() calls return the same value?
216  */
217  TM_INLINE
218  inline void exp_backoff(TxThread* tx)
219  {
220  // how many bits should we use to pick an amount of time to wait?
221  uint32_t bits = tx->consec_aborts + BACKOFF_MIN - 1;
222  bits = (bits > BACKOFF_MAX) ? BACKOFF_MAX : bits;
223  // get a random amount of time to wait, bounded by an exponentially
224  // increasing limit
225  int32_t delay = rand_r_32(&tx->seed);
226  delay &= ((1 << bits)-1);
227  // wait until at least that many ns have passed
228  unsigned long long start = getElapsedTime();
229  unsigned long long stop_at = start + delay;
230  while (getElapsedTime() < stop_at) { spin64(); }
231  }
232 
233  // This is used as a default in txthread.cpp... just forwards to CGL::begin.
234  TM_FASTCALL bool begin_CGL(TxThread*);
235 
236  typedef TM_FASTCALL void* (*ReadBarrier)(STM_READ_SIG(,,));
237  typedef TM_FASTCALL void (*WriteBarrier)(STM_WRITE_SIG(,,,));
239 
240  inline void OnReadWriteCommit(TxThread* tx, ReadBarrier read_ro,
241  WriteBarrier write_ro, CommitBarrier commit_ro)
242  {
243  tx->allocator.onTxCommit();
245  tx->consec_aborts = 0;
246  ++tx->num_commits;
247  tx->tmread = read_ro;
248  tx->tmwrite = write_ro;
249  tx->tmcommit = commit_ro;
250  Trigger::onCommitSTM(tx);
251  }
252 
254  {
255  tx->allocator.onTxCommit();
257  tx->consec_aborts = 0;
258  ++tx->num_commits;
259  Trigger::onCommitSTM(tx);
260  }
261 
263  {
264  tx->allocator.onTxCommit();
266  tx->consec_aborts = 0;
267  ++tx->num_ro;
268  Trigger::onCommitSTM(tx);
269  }
270 
271  inline void OnCGLCommit(TxThread* tx)
272  {
273  tx->allocator.onTxCommit();
274  ++tx->num_commits;
275  Trigger::onCommitLock(tx);
276  }
277 
279  {
280  tx->allocator.onTxCommit();
281  ++tx->num_ro;
282  Trigger::onCommitLock(tx);
283  }
284 
285  inline void OnFirstWrite(TxThread* tx, ReadBarrier read_rw,
286  WriteBarrier write_rw, CommitBarrier commit_rw)
287  {
288  tx->tmread = read_rw;
289  tx->tmwrite = write_rw;
290  tx->tmcommit = commit_rw;
291  }
292 
293  inline void PreRollback(TxThread* tx)
294  {
295  ++tx->num_aborts;
296  ++tx->consec_aborts;
297  }
298 
300  WriteBarrier write_ro, CommitBarrier commit_ro)
301  {
302  tx->allocator.onTxAbort();
303  tx->nesting_depth = 0;
304  tx->tmread = read_ro;
305  tx->tmwrite = write_ro;
306  tx->tmcommit = commit_ro;
307  Trigger::onAbort(tx);
308  scope_t* scope = tx->scope;
309  tx->scope = NULL;
310  return scope;
311  }
312 
314  {
315  tx->allocator.onTxAbort();
316  tx->nesting_depth = 0;
317  Trigger::onAbort(tx);
318  scope_t* scope = tx->scope;
319  tx->scope = NULL;
320  return scope;
321  }
322 
323  /**
324  * Custom PostRollback code for ProfileTM. If a transaction other than
325  * the last in the profile set aborts, we roll it back using this
326  * function, which does everything the prior PostRollback did except for
327  * calling the "Trigger::onAbort()" method.
328  */
329  inline scope_t*
333  {
334  tx->allocator.onTxAbort();
335  tx->nesting_depth = 0;
336  tx->tmread = r;
337  tx->tmwrite = w;
338  tx->tmcommit = c;
339  scope_t* scope = tx->scope;
340  tx->scope = NULL;
341  return scope;
342  }
343 
344  /**
345  * Custom PostRollback code for ProfileTM. If the last transaction in the
346  * profile set aborts, it will call profile_oncomplete before calling this.
347  * That means that it will adapt /out of/ ProfileTM, which in turn means
348  * that we cannot reset the pointers on abort.
349  */
351  {
352  tx->allocator.onTxAbort();
353  tx->nesting_depth = 0;
354  scope_t* scope = tx->scope;
355  tx->scope = NULL;
356  return scope;
357  }
358 
360  CommitBarrier c)
361  {
362  tx->tmread = r;
363  tx->tmwrite = w;
364  tx->tmcommit = c;
365  }
366 
367  inline bool CheckTurboMode(TxThread* tx, ReadBarrier read_turbo)
368  {
369  return (tx->tmread == read_turbo);
370  }
371 
372  /**
373  * Stuff from metadata.hpp
374  */
375 
376  /**
377  * Setting the read byte is platform-specific, so we are going to put it
378  * here to avoid lots of ifdefs in many code locations. The issue is
379  * that we need this write to also be a WBR fence, and the cheapest WBR
380  * is platform-dependent
381  */
382  inline void bytelock_t::set_read_byte(uint32_t id)
383  {
384 #if defined(STM_CPU_SPARC)
385  reader[id] = 1; WBR;
386 #else
387  atomicswap8(&reader[id], 1u);
388 #endif
389  }
390 
391  /*** set a bit */
392  inline void rrec_t::setbit(unsigned slot)
393  {
394  uint32_t bucket = slot / BITS;
395  uintptr_t mask = 1lu<<(slot % BITS);
396  uintptr_t oldval = bits[bucket];
397  if (oldval & mask)
398  return;
399  while (true) {
400  if (bcasptr(&bits[bucket], oldval, (oldval | mask)))
401  return;
402  oldval = bits[bucket];
403  }
404  }
405 
406  /*** test a bit */
407  inline bool rrec_t::getbit(unsigned slot)
408  {
409  unsigned bucket = slot / BITS;
410  uintptr_t mask = 1lu<<(slot % BITS);
411  uintptr_t oldval = bits[bucket];
412  return oldval & mask;
413  }
414 
415  /*** unset a bit */
416  inline void rrec_t::unsetbit(unsigned slot)
417  {
418  uint32_t bucket = slot / BITS;
419  uintptr_t mask = 1lu<<(slot % BITS);
420  uintptr_t unmask = ~mask;
421  uintptr_t oldval = bits[bucket];
422  if (!(oldval & mask))
423  return;
424  // NB: this GCC-specific code
425 #if defined(STM_CPU_X86) && defined(STM_CC_GCC)
426  __sync_fetch_and_and(&bits[bucket], unmask);
427 #else
428  while (true) {
429  if (bcasptr(&bits[bucket], oldval, (oldval & unmask)))
430  return;
431  oldval = bits[bucket];
432  }
433 #endif
434  }
435 
436  /*** combine test and set */
437  inline bool rrec_t::setif(unsigned slot)
438  {
439  uint32_t bucket = slot / BITS;
440  uintptr_t mask = 1lu<<(slot % BITS);
441  uintptr_t oldval = bits[bucket];
442  if (oldval & mask)
443  return false;
444  // NB: We don't have suncc fetch_and_or, so there is an ifdef here that
445  // falls back to a costly CAS-based atomic or
446 #if defined(STM_CPU_X86) && defined(STM_CC_GCC) /* little endian */
447  __sync_fetch_and_or(&bits[bucket], mask);
448  return true;
449 #else
450  while (true) {
451  if (bcasptr(&bits[bucket], oldval, oldval | mask))
452  return true;
453  oldval = bits[bucket];
454  }
455 #endif
456  }
457 
458  /*** bitwise or */
459  inline void rrec_t::operator |= (rrec_t& rhs)
460  {
461  // NB: We could probably use SSE here, but since we've only got ~256
462  // bits, the savings would be minimal
463  for (unsigned i = 0; i < BUCKETS; ++i)
464  bits[i] |= rhs.bits[i];
465  }
466 
467  /*** on commit, update the appropriate bucket */
468  inline void toxic_histogram_t::onCommit(uint32_t aborts)
469  {
470  if (aborts < 17) {
471  buckets[aborts]++;
472  }
473  // overflow bucket: must also update the max value
474  else {
475  buckets[17]++;
476  if (aborts > max)
477  max = aborts;
478  }
479  }
480 
481  /*** simple printout */
483  {
484  printf("abort_histogram: ");
485  for (int i = 0; i < 18; ++i)
486  printf("%d, ", buckets[i]);
487  printf("max = %d, hgc = %d, hga = %d\n", max, hg_commits, hg_aborts);
488  }
489 
490  /*** on hourglass commit */
493 
494 } // namespace stm
495 
496 #endif // ALGS_HPP__
void spin64()
Definition: locks.hpp:36
#define STM_WRITE_SIG(tx, addr, val, mask)
Definition: macros.hpp:85
static const uint32_t RREC_COUNT
Definition: algs.hpp:61
ALGS
Definition: algs.hpp:35
Definition: algs.hpp:38
bool privatization_safe
Definition: algs.hpp:130
dynprof_t * profiles
Definition: algs.cpp:78
void onTxAbort()
Definition: WBMMPolicy.hpp:150
static const uint32_t BACKOFF_MAX
Definition: algs.hpp:60
static void * start(jsw_avltrav_t *trav, jsw_avltree_t *tree, long dir)
Definition: avltree.c:681
Definition: algs.hpp:40
Definition: algs.hpp:41
uint32_t buckets[18]
Definition: metadata.hpp:205
Definition: metadata.hpp:115
void setbit(unsigned slot)
Definition: algs.hpp:392
Definition: algs.hpp:46
Definition: stm_fraser.c:61
TM_INLINE rrec_t * get_rrec(void *addr)
Definition: algs.hpp:165
bool(* TM_FASTCALL)(TxThread *)
Definition: algs.hpp:107
TM_FASTCALL void * read(STM_READ_SIG(,,))
bool getbit(unsigned slot)
Definition: algs.hpp:407
TRANSACTION_SAFE int bucket(const point *const p)
Definition: point.hpp:153
Definition: algs.hpp:40
uint32_t profile_txns
Definition: algs.cpp:77
TM_FASTCALL bool begin_CGL(TxThread *)
Definition: cgl.cpp:127
Definition: algs.hpp:45
TM_INLINE void exp_backoff(TxThread *tx)
Definition: algs.hpp:218
#define STM_READ_SIG(tx, addr, mask)
Definition: macros.hpp:84
uint32_t max
Definition: metadata.hpp:196
Definition: algs.hpp:41
uint32_t seed
Definition: txthread.hpp:72
Definition: metadata.hpp:97
void OnCGLCommit(TxThread *tx)
Definition: algs.hpp:271
Definition: algs.hpp:49
scope_t * PostRollbackNoTrigger(TxThread *tx, stm::ReadBarrier r, stm::WriteBarrier w, stm::CommitBarrier c)
Definition: algs.hpp:330
Definition: metadata.hpp:128
void OnReadOnlyCGLCommit(TxThread *tx)
Definition: algs.hpp:278
Definition: algs.hpp:38
void onCommit(uint32_t aborts)
Definition: algs.hpp:468
bool setif(unsigned slot)
Definition: algs.hpp:437
TM_INLINE orec_t * get_orec(void *addr)
Definition: algs.hpp:145
TM_FASTCALL void write(STM_WRITE_SIG(,,,))
#define STM_IRREVOC_SIG(tx, stack)
Definition: macros.hpp:93
void onCommit(uint32_t)
Definition: metadata.hpp:233
Definition: policies.hpp:92
Definition: algs.hpp:47
pad_word_t fcm_timestamp
Definition: algs.cpp:68
TM_FASTCALL void *(* ReadBarrier)(STM_READ_SIG(,,))
Definition: algs.hpp:236
mcs_qnode_t * mcslock
Definition: algs.cpp:62
Definition: algs.hpp:49
void OnReadWriteCommit(TxThread *tx, ReadBarrier read_ro, WriteBarrier write_ro, CommitBarrier commit_ro)
Definition: algs.hpp:240
Definition: algs.hpp:46
Definition: algs.hpp:46
volatile unsigned char reader[CACHELINE_BYTES-sizeof(uint32_t)]
Definition: metadata.hpp:100
scope_t *volatile scope
Definition: txthread.hpp:57
Definition: metadata.hpp:157
Definition: algs.hpp:45
Definition: algs.hpp:42
TM_INLINE void begin(TxThread *tx, scope_t *s, uint32_t)
Definition: library.hpp:71
pad_word_t epochs[MAX_THREADS]
Definition: algs.cpp:56
alg_t()
Definition: algs.hpp:133
static const uint32_t WB_CHUNK_SIZE
Definition: algs.hpp:62
Definition: algs.hpp:44
int rand_r_32(unsigned int *seed)
Definition: rand_r_32.h:43
Definition: algs.hpp:49
void onHGAbort()
Definition: algs.hpp:492
uint32_t hg_aborts
Definition: metadata.hpp:202
void(* switcher)()
Definition: algs.hpp:122
bitlock_t bitlocks[NUM_STRIPES]
Definition: algs.cpp:53
TM_INLINE void commit(TxThread *tx)
Definition: library.hpp:104
scope_t * PostRollback(TxThread *tx, ReadBarrier read_ro, WriteBarrier write_ro, CommitBarrier commit_ro)
Definition: algs.hpp:299
uint32_t num_ro
Definition: txthread.hpp:56
uint32_t num_aborts
Definition: txthread.hpp:54
static const uint32_t BACKOFF_MIN
Definition: algs.hpp:59
TM_FASTCALL void(* tmcommit)(STM_COMMIT_SIG(,))
Definition: txthread.hpp:118
TM_FASTCALL void *(* tmread)(STM_READ_SIG(,,))
Definition: txthread.hpp:119
void set_read_byte(uint32_t id)
Definition: algs.hpp:382
toxic_t abort_hist
Definition: txthread.hpp:86
Definition: algs.hpp:43
void OnFirstWrite(TxThread *tx, ReadBarrier read_rw, WriteBarrier write_rw, CommitBarrier commit_rw)
Definition: algs.hpp:285
orec_t orecs[NUM_STRIPES]
Definition: algs.cpp:35
#define STM_COMMIT_SIG(tx, stack)
Definition: macros.hpp:92
void scope_t
Definition: metadata.hpp:39
void operator|=(rrec_t &rhs)
Definition: algs.hpp:459
WBMMPolicy allocator
Definition: txthread.hpp:52
static const uint32_t KARMA_FACTOR
Definition: algs.hpp:58
ticket_lock_t ticketlock
Definition: algs.cpp:65
int stm_name_map(const char *phasename)
Definition: algs.cpp:81
void GoTurbo(TxThread *tx, ReadBarrier r, WriteBarrier w, CommitBarrier c)
Definition: algs.hpp:359
Definition: algs.hpp:49
Definition: algs.hpp:43
#define TM_INLINE
Definition: platform.hpp:77
stm_tx * tx
Definition: stmskip.cc:245
Definition: algs.hpp:44
volatile uintptr_t bits[BUCKETS]
Definition: metadata.hpp:133
Definition: algs.hpp:40
Definition: algs.hpp:98
Definition: algs.hpp:38
Definition: algs.hpp:38
pad_word_t prioTxCount
Definition: algs.cpp:46
TM_INLINE bytelock_t * get_bytelock(void *addr)
Definition: algs.hpp:175
TM_INLINE bitlock_t * get_bitlock(void *addr)
Definition: algs.hpp:185
dynprof_t * app_profiles
Definition: algs.cpp:74
Definition: algs.hpp:39
void PreRollback(TxThread *tx)
Definition: algs.hpp:293
uint32_t num_commits
Definition: txthread.hpp:53
Definition: locks.hpp:85
Definition: algs.hpp:40
uint32_t consec_aborts
Definition: txthread.hpp:71
pad_word_t last_init
Definition: algs.cpp:42
uint32_t nesting_depth
Definition: txthread.hpp:51
static const uint32_t ACTIVE
Definition: algs.hpp:64
bool CheckTurboMode(TxThread *tx, ReadBarrier read_turbo)
Definition: algs.hpp:367
Definition: algs.hpp:40
void OnReadOnlyCommit(TxThread *tx)
Definition: algs.hpp:262
Definition: algs.hpp:45
Definition: algs.hpp:39
Definition: algs.hpp:46
bytelock_t bytelocks[NUM_STRIPES]
Definition: algs.cpp:50
TM_INLINE orec_t * get_nanorec(void *addr)
Definition: algs.hpp:155
Definition: txthread.hpp:47
TM_FASTCALL void(* CommitBarrier)(STM_COMMIT_SIG(,))
Definition: algs.hpp:238
bool(* irrevoc)(STM_IRREVOC_SIG(,))
Definition: algs.hpp:119
static const unsigned MAX_THREADS
Definition: metadata.hpp:33
Definition: algs.hpp:44
TM_FASTCALL void(* WriteBarrier)(STM_WRITE_SIG(,,,))
Definition: algs.hpp:237
Definition: algs.hpp:44
Definition: algs.hpp:45
const char * name
Definition: algs.hpp:101
rrec_t rrecs[RREC_COUNT]
Definition: algs.cpp:47
Definition: algs.hpp:39
static const uint32_t EPOCH_MAX
Definition: algs.hpp:63
#define STM_ROLLBACK_SIG(tx, stack, exception, len)
Definition: macros.hpp:106
pad_word_t greedy_ts
Definition: algs.cpp:59
orec_t nanorecs[RING_ELEMENTS]
Definition: algs.cpp:38
TM_FASTCALL void(* tmwrite)(STM_WRITE_SIG(,,,))
Definition: txthread.hpp:120
static const uint32_t RING_ELEMENTS
Definition: algs.hpp:57
Definition: algs.hpp:43
pad_word_t last_complete
Definition: algs.cpp:41
Definition: algs.hpp:51
Definition: algs.hpp:41
static const uint32_t SWISS_PHASE2
Definition: algs.hpp:66
static const uint32_t ABORTED
Definition: algs.hpp:65
Definition: algs.hpp:38
Definition: algs.hpp:42
Definition: algs.hpp:47
Definition: algs.hpp:41
Definition: algs.hpp:39
void onTxCommit()
Definition: WBMMPolicy.hpp:161
Definition: algs.hpp:40
void initTM()
Definition: metadata.hpp:72
Definition: algs.hpp:40
Definition: algs.hpp:39
union stm::id_version_t TM_ALIGN
uint32_t hg_commits
Definition: metadata.hpp:199
static const uint32_t BUCKETS
Definition: metadata.hpp:131
Definition: algs.hpp:39
void unsetbit(unsigned slot)
Definition: algs.hpp:416
Definition: BitFilter.hpp:36
Definition: locks.hpp:112
static const uint32_t NUM_STRIPES
Definition: algs.hpp:56
Definition: algs.hpp:47
Definition: algs.hpp:47
Definition: algs.hpp:39
pad_word_t timestamp_max
Definition: algs.cpp:32
void onHGCommit()
Definition: algs.hpp:491
alg_t stms[ALG_MAX]
Definition: algs.cpp:71
Definition: algs.hpp:42
Definition: algs.hpp:43
Definition: algs.hpp:40
void dump()
Definition: algs.hpp:482
pad_word_t timestamp
Definition: algs.cpp:22
static const uint32_t BITS
Definition: metadata.hpp:132
#define TM_FASTCALL
Definition: platform.hpp:85