tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
stm::bytelock_t Struct Reference

#include <metadata.hpp>

Collaboration diagram for stm::bytelock_t:

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)]
 

Detailed Description

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.

Member Function Documentation

void stm::bytelock_t::set_read_byte ( uint32_t  id)
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

Member Data Documentation

volatile uint32_t stm::bytelock_t::owner
volatile unsigned char stm::bytelock_t::reader[CACHELINE_BYTES-sizeof(uint32_t)]

The documentation for this struct was generated from the following files: