Zero  0.1.0
Public Types | Public Attributes | List of all members
RawLock Struct Reference

An RAW-style lock entry in the queue. More...

#include <lock_raw.h>

Inheritance diagram for RawLock:
GcPoolEntry

Public Types

enum  LockState { UNUSED = 0, OBSOLETE, ACTIVE, WAITING }
 

Public Attributes

uint32_t hash
 
LockState state
 
MarkablePointer< RawLocknext
 
RawXctowner_xct
 
okvl_mode mode
 
RawLockxct_previous
 
RawLockxct_next
 
RawLockxct_hashmap_previous
 
RawLockxct_hashmap_next
 
- Public Attributes inherited from GcPoolEntry
gc_pointer_raw gc_pointer
 

Detailed Description

An RAW-style lock entry in the queue.

Unlike the original Shore-MT lock manager, this lock entry does not have the notion of "upgrading" state. When we need more permissions in the key, we just create another lock entry. Thus, we might have multiple lock entries from one transaction in one queue. This enables the RAW-style lock queue optimizations.

Member Enumeration Documentation

§ LockState

Enumerator
UNUSED 

This lock is in the pool and not used in any queue.

OBSOLETE 

This lock exists in a queue, but others can skip over or remove it.

ACTIVE 

This lock is granted and other transactions must respect this lock.

WAITING 

This lock is not granted and waiting for others to unlock.

Member Data Documentation

§ hash

uint32_t RawLock::hash

Precise hash of the protected resource.

§ mode

okvl_mode RawLock::mode

Requested lock mode.

§ next

MarkablePointer<RawLock> RawLock::next

Constitutes a singly-linked list in RawLockQueue.

§ owner_xct

RawXct* RawLock::owner_xct

owning xct.

§ state

LockState RawLock::state

Current status of this lock.

§ xct_hashmap_next

RawLock* RawLock::xct_hashmap_next

§ xct_hashmap_previous

RawLock* RawLock::xct_hashmap_previous

§ xct_next

RawLock* RawLock::xct_next

Doubly-linked list in RawXct. This is a transaction-private information.

§ xct_previous

RawLock* RawLock::xct_previous

Doubly-linked list in RawXct. This is a transaction-private information.


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