tlds
Transactional Operations for Linked Data Structures
|
#include <metadata.hpp>
Public Member Functions | |
void | set_read_byte (uint32_t id) |
Public Attributes | |
volatile uint32_t | owner |
volatile unsigned char | reader [CACHELINE_BYTES-sizeof(uint32_t)] |
TLRW-style algorithms don't use orecs, but instead use "byte locks". This is the type of a byte lock. We have 32 bits for the lock, and then 60 bytes corresponding to 60 named threads.
NB: We don't support more than 60 threads in ByteLock-based algorithms. If you have more than that many threads, you should use adaptivity to switch to a different algorithm.
|
inline |
Setting the read byte is platform-specific, so we make it a method of the bytelock_t
NB: implemented in algs.hpp, so that it is visible where needed, but not visible globally
Stuff from metadata.hpp Setting the read byte is platform-specific, so we are going to put it here to avoid lots of ifdefs in many code locations. The issue is that we need this write to also be a WBR fence, and the cheapest WBR is platform-dependent
volatile uint32_t stm::bytelock_t::owner |
volatile unsigned char stm::bytelock_t::reader[CACHELINE_BYTES-sizeof(uint32_t)] |