libfoedus-core
FOEDUS Core Library
xct_id.hpp File Reference

Definitions of IDs in this package and a few related constant values. More...

Detailed Description

Definitions of IDs in this package and a few related constant values.

Definition in file xct_id.hpp.

Include dependency graph for xct_id.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  foedus::xct::AcquireAsyncRet
 Return value of acquire_async_rw. More...
 
struct  foedus::xct::McsWwBlockData
 Exclusive-only (WW) MCS lock classes. More...
 
struct  foedus::xct::McsWwBlock
 Pre-allocated MCS block for WW-locks. More...
 
struct  foedus::xct::McsWwLock
 An exclusive-only (WW) MCS lock data structure. More...
 
struct  foedus::xct::McsRwSimpleBlock
 Reader-writer (RW) MCS lock classes. More...
 
union  foedus::xct::McsRwSimpleBlock::Self
 
struct  foedus::xct::McsRwSimpleBlock::Self::Components
 
struct  foedus::xct::McsRwExtendedBlock
 Pre-allocated MCS block for extended version of RW-locks. More...
 
union  foedus::xct::McsRwExtendedBlock::Field
 
struct  foedus::xct::McsRwExtendedBlock::Field::Components
 
struct  foedus::xct::McsRwLock
 An MCS reader-writer lock data structure. More...
 
struct  foedus::xct::McsRwAsyncMapping
 
struct  foedus::xct::XctId
 Persistent status part of Transaction ID. More...
 
struct  foedus::xct::LockableXctId
 Transaction ID, a 128-bit data to manage record versions and provide locking mechanism. More...
 
struct  foedus::xct::RwLockableXctId
 The MCS reader-writer lock variant of LockableXctId. More...
 
class  foedus::xct::McsOwnerlessLockScope
 
struct  foedus::xct::TrackMovedRecordResult
 Result of track_moved_record(). More...
 

Namespaces

 foedus
 Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
 
 foedus::xct
 Transaction Manager, which provides APIs to begin/commit/abort transactions.
 

Typedefs

typedef uintptr_t foedus::xct::UniversalLockId
 Universally ordered identifier of each lock. More...
 
typedef uint32_t foedus::xct::LockListPosition
 Index in a lock-list, either RLL or CLL. More...
 
typedef uint32_t foedus::xct::McsBlockIndex
 Index in thread-local MCS block. More...
 

Enumerations

enum  foedus::xct::IsolationLevel { foedus::xct::kDirtyRead, foedus::xct::kSnapshot, foedus::xct::kSerializable }
 Specifies the level of isolation during transaction processing. More...
 
enum  foedus::xct::LockMode { foedus::xct::kNoLock = 0, foedus::xct::kReadLock, foedus::xct::kWriteLock }
 Represents a mode of lock. More...
 

Functions

UniversalLockId foedus::xct::to_universal_lock_id (const memory::GlobalVolatilePageResolver &resolver, uintptr_t lock_ptr)
 Always use this method rather than doing the conversion yourself. More...
 
UniversalLockId foedus::xct::to_universal_lock_id (uint64_t numa_node, uint64_t local_page_index, uintptr_t lock_ptr)
 If you already have the numa_node, local_page_index, prefer this one. More...
 
UniversalLockId foedus::xct::xct_id_to_universal_lock_id (const memory::GlobalVolatilePageResolver &resolver, RwLockableXctId *lock)
 
UniversalLockId foedus::xct::rw_lock_to_universal_lock_id (const memory::GlobalVolatilePageResolver &resolver, McsRwLock *lock)
 
RwLockableXctId * foedus::xct::from_universal_lock_id (const memory::GlobalVolatilePageResolver &resolver, const UniversalLockId universal_lock_id)
 Always use this method rather than doing the conversion yourself. More...
 
void foedus::xct::_dummy_static_size_check__COUNTER__ ()
 

Variables

const UniversalLockId foedus::xct::kNullUniversalLockId = 0
 This never points to a valid lock, and also evaluates less than any vaild alocks. More...
 
const LockListPosition foedus::xct::kLockListPositionInvalid = 0
 
const uint64_t foedus::xct::kMcsGuestId = -1
 A special value meaning the lock is held by a non-regular guest that doesn't have a context. More...
 
const uint64_t foedus::xct::kXctIdDeletedBit = 1ULL << 63
 
const uint64_t foedus::xct::kXctIdMovedBit = 1ULL << 62
 
const uint64_t foedus::xct::kXctIdBeingWrittenBit = 1ULL << 61
 
const uint64_t foedus::xct::kXctIdNextLayerBit = 1ULL << 60
 
const uint64_t foedus::xct::kXctIdMaskSerializer = 0x0FFFFFFFFFFFFFFFULL
 
const uint64_t foedus::xct::kXctIdMaskEpoch = 0x0FFFFFFF00000000ULL
 
const uint64_t foedus::xct::kXctIdMaskOrdinal = 0x00000000FFFFFFFFULL
 
const uint64_t foedus::xct::kMaxXctOrdinal = (1ULL << 24) - 1U
 Maximum value of in-epoch ordinal. More...
 
const uint64_t foedus::xct::kLockPageSize = 1 << 12
 Must be same as storage::kPageSize. More...
 

Class Documentation

struct foedus::xct::AcquireAsyncRet

Return value of acquire_async_rw.

Definition at line 161 of file xct_id.hpp.

Class Members
bool acquired_ whether we immediately acquired the lock or not
McsBlockIndex block_index_ the queue node we pushed.

It is always set whether acquired_ or not, whether simple or extended. However, in simple case when !acquired_, the block is not used and nothing sticks to the queue. We just skip the index next time.

union foedus::xct::McsRwSimpleBlock::Self

Definition at line 403 of file xct_id.hpp.

Collaboration diagram for foedus::xct::McsRwSimpleBlock::Self:
Class Members
struct Components components_
uint16_t data_
struct foedus::xct::McsRwSimpleBlock::Self::Components

Definition at line 405 of file xct_id.hpp.

Class Members
uint8_t state_
uint8_t successor_class_
union foedus::xct::McsRwExtendedBlock::Field

Definition at line 554 of file xct_id.hpp.

Collaboration diagram for foedus::xct::McsRwExtendedBlock::Field:
Class Members
struct Components components_
uint64_t data_
struct foedus::xct::McsRwExtendedBlock::Field::Components

Definition at line 556 of file xct_id.hpp.

Class Members
uint32_t flags_
uint32_t id_