libfoedus-core
FOEDUS Core Library
foedus::xct::McsWwBlock Struct Reference

Pre-allocated MCS block for WW-locks. More...

Detailed Description

Pre-allocated MCS block for WW-locks.

we so far pre-allocate at most 2^16 nodes per thread.

Definition at line 274 of file xct_id.hpp.

#include <xct_id.hpp>

Collaboration diagram for foedus::xct::McsWwBlock:

Public Member Functions

bool has_successor_relaxed () const __attribute__((always_inline))
 setter/getter for successor_. More...
 
bool has_successor_consume () const __attribute__((always_inline))
 
bool has_successor_acquire () const __attribute__((always_inline))
 
bool has_successor_atomic () const __attribute__((always_inline))
 
uint32_t get_successor_thread_id_relaxed () const __attribute__((always_inline))
 Carefully use this! In some places you must call copy_once() then call this on the copy. More...
 
McsBlockIndex get_successor_block_relaxed () const __attribute__((always_inline))
 Carefully use this! In some places you must call copy_once() then call this on the copy. More...
 
void clear_successor_atomic () __attribute__((always_inline))
 
void clear_successor_release () __attribute__((always_inline))
 
void set_successor_atomic (thread::ThreadId thread_id, McsBlockIndex block) __attribute__((always_inline))
 
void set_successor_release (thread::ThreadId thread_id, McsBlockIndex block) __attribute__((always_inline))
 

Public Attributes

McsWwBlockData successor_
 The successor of MCS lock queue after this thread (in other words, the thread that is waiting for this thread). More...
 

Member Function Documentation

void foedus::xct::McsWwBlock::clear_successor_atomic ( )
inline

Definition at line 301 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::clear_atomic().

void clear_atomic() __attribute__((always_inline))
Definition: xct_id.hpp:254
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

void foedus::xct::McsWwBlock::clear_successor_release ( )
inline

Definition at line 302 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::clear_release().

Referenced by foedus::xct::McsWwImpl< ADAPTOR >::acquire_try(), foedus::xct::McsWwImpl< ADAPTOR >::acquire_unconditional(), and foedus::xct::McsWwImpl< ADAPTOR >::initial().

void clear_release() __attribute__((always_inline))
Definition: xct_id.hpp:255
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

Here is the caller graph for this function:

McsBlockIndex foedus::xct::McsWwBlock::get_successor_block_relaxed ( ) const
inline

Carefully use this! In some places you must call copy_once() then call this on the copy.

We thus put "_relaxed" as suffix.

Definition at line 298 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::get_block_relaxed().

298  {
299  return successor_.get_block_relaxed();
300  }
McsBlockIndex get_block_relaxed() const __attribute__((always_inline))
Carefully use this! In some places you must call get_word_once() then call this on the copy...
Definition: xct_id.hpp:250
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

uint32_t foedus::xct::McsWwBlock::get_successor_thread_id_relaxed ( ) const
inline

Carefully use this! In some places you must call copy_once() then call this on the copy.

We thus put "_relaxed" as suffix.

Definition at line 291 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::get_thread_id_relaxed().

Referenced by foedus::xct::McsWwImpl< ADAPTOR >::release().

291  {
293  }
uint32_t get_thread_id_relaxed() const __attribute__((always_inline))
Carefully use this! In some places you must call get_word_once() then call this on the copy...
Definition: xct_id.hpp:243
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::McsWwBlock::has_successor_acquire ( ) const
inline

Definition at line 285 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::is_valid_acquire().

Referenced by foedus::xct::McsWwImpl< ADAPTOR >::release().

285 { return successor_.is_valid_acquire(); }
bool is_valid_acquire() const __attribute__((always_inline))
Definition: xct_id.hpp:232
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

Here is the caller graph for this function:

bool foedus::xct::McsWwBlock::has_successor_atomic ( ) const
inline

Definition at line 286 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::is_valid_atomic().

286 { return successor_.is_valid_atomic(); }
bool is_valid_atomic() const __attribute__((always_inline))
Definition: xct_id.hpp:233
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

bool foedus::xct::McsWwBlock::has_successor_consume ( ) const
inline

Definition at line 284 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::is_valid_consume().

284 { return successor_.is_valid_consume(); }
bool is_valid_consume() const __attribute__((always_inline))
Definition: xct_id.hpp:231
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

bool foedus::xct::McsWwBlock::has_successor_relaxed ( ) const
inline

setter/getter for successor_.

Definition at line 283 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::is_valid_relaxed().

283 { return successor_.is_valid_relaxed(); }
bool is_valid_relaxed() const __attribute__((always_inline))
Definition: xct_id.hpp:230
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

void foedus::xct::McsWwBlock::set_successor_atomic ( thread::ThreadId  thread_id,
McsBlockIndex  block 
)
inline

Definition at line 303 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::set_atomic().

303  {
304  successor_.set_atomic(thread_id, block);
305  }
void set_atomic(uint32_t thread_id, McsBlockIndex block) __attribute__((always_inline))
Definition: xct_id.hpp:259
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

void foedus::xct::McsWwBlock::set_successor_release ( thread::ThreadId  thread_id,
McsBlockIndex  block 
)
inline

Definition at line 306 of file xct_id.hpp.

References foedus::xct::McsWwBlockData::set_release().

306  {
307  successor_.set_release(thread_id, block);
308  }
void set_release(uint32_t thread_id, McsBlockIndex block) __attribute__((always_inline))
Definition: xct_id.hpp:262
McsWwBlockData successor_
The successor of MCS lock queue after this thread (in other words, the thread that is waiting for thi...
Definition: xct_id.hpp:280

Here is the call graph for this function:

Member Data Documentation

McsWwBlockData foedus::xct::McsWwBlock::successor_

The successor of MCS lock queue after this thread (in other words, the thread that is waiting for this thread).

Successor is represented by thread ID and block, the index in mcs_blocks_.

Definition at line 280 of file xct_id.hpp.


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