libfoedus-core
FOEDUS Core Library
|
Pre-allocated MCS block for extended version of RW-locks. More...
Pre-allocated MCS block for extended version of RW-locks.
Definition at line 513 of file xct_id.hpp.
#include <xct_id.hpp>
Classes | |
union | Field |
Public Member Functions | |
void | mark_released () |
bool | is_released () |
uint32_t | read_pred_flags () |
uint32_t | read_next_flags () |
bool | is_writer () |
bool | is_reader () |
bool | pred_flag_is_waiting () |
bool | pred_flag_is_granted () |
bool | next_flag_is_direct_granted () |
bool | next_flag_is_leaving_granted () |
bool | next_flag_is_granted () |
bool | next_flag_is_leaving () |
bool | next_flag_is_waiting () |
void | set_next_flag_writer_successor () |
void | set_next_flag_reader_successor () |
void | set_pred_flag_granted () |
void | set_next_flag_granted () |
void | set_next_flag_busy_granted () |
void | set_next_flag_leaving () |
void | set_next_flag_no_successor () |
void | set_next (uint64_t next) |
bool | cas_next_weak (uint64_t expected, uint64_t desired) |
bool | cas_next_strong (uint64_t expected, uint64_t desired) |
void | set_flags_granted () |
bool | next_flag_has_successor () |
bool | next_flag_has_reader_successor () |
bool | next_flag_has_writer_successor () |
bool | next_flag_is_busy () |
void | set_next_flag_busy () |
void | unset_next_flag_busy () |
uint32_t | cas_val_next_flag_strong (uint32_t expected, uint32_t desired) |
uint32_t | cas_val_next_flag_weak (uint32_t expected, uint32_t desired) |
uint64_t | cas_val_next_strong (uint64_t expected, uint64_t desired) |
uint64_t | cas_val_next_weak (uint64_t expected, uint64_t desired) |
uint32_t | xchg_next_id (uint32_t id) |
bool | cas_next_id_strong (uint32_t expected, uint32_t desired) |
bool | cas_next_id_weak (uint32_t expected, uint32_t desired) |
bool | cas_pred_id_weak (uint32_t expected, uint32_t desired) |
bool | cas_pred_id_strong (uint32_t expected, uint32_t desired) |
uint32_t | cas_val_pred_id_weak (uint32_t expected, uint32_t desired) |
uint32_t | make_next_flag_waiting_with_no_successor () |
uint32_t | make_next_flag_waiting_with_reader_successor () |
uint32_t | get_pred_id () |
uint32_t | get_next_id () |
uint64_t | get_next () |
void | set_pred_id (uint32_t id) |
void | set_next_id (uint32_t id) |
uint32_t | xchg_pred_id (uint32_t id) |
void | init_reader () |
void | init_writer () |
bool | timeout_granted (int32_t timeout) |
Public Attributes | |
Field | pred_ |
Field | next_ |
Static Public Attributes | |
static const uint32_t | kPredFlagWaiting = 0U |
Pred flags: |—31—|--—|—0—| |my class|empty|waiting|. More... | |
static const uint32_t | kPredFlagGranted = 1U |
static const uint32_t | kPredFlagReader = 0U |
static const uint32_t | kPredFlagWriter = 1U << 31 |
static const uint32_t | kPredFlagClassMask = 1U << 31 |
static const uint32_t | kSuccFlagWaiting = 0U |
static const uint32_t | kSuccFlagLeaving = 1U |
static const uint32_t | kSuccFlagDirectGranted = 2U |
static const uint32_t | kSuccFlagLeavingGranted = 3U |
static const uint32_t | kSuccFlagMask = 3U |
static const uint32_t | kSuccFlagBusy = 4U |
static const uint32_t | kSuccFlagSuccessorClassMask = 3U << 30 |
static const uint32_t | kSuccFlagSuccessorReader = 3U << 30 |
static const uint32_t | kSuccFlagSuccessorNone = 0U |
static const uint32_t | kSuccFlagSuccessorWriter = 1U << 30 |
static const uint32_t | kSuccIdSuccessorLeaving = 0xFFFFFFFFU |
static const uint32_t | kSuccIdNoSuccessor = 0xFFFFFFFEU |
static const uint32_t | kPredIdAcquired = 0xFFFFFFFFU |
static const uint64_t | kSuccReleased = 0xFFFFFFFFFFFFFFFFU |
static const int32_t | kTimeoutNever = 0xFFFFFFFFU |
static const int32_t | kTimeoutZero = 0U |
union foedus::xct::McsRwExtendedBlock::Field |
Definition at line 554 of file xct_id.hpp.
Class Members | ||
---|---|---|
struct Components | components_ | |
uint64_t | data_ |
|
inline |
Definition at line 717 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 721 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 664 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
|
inline |
Definition at line 660 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
|
inline |
Definition at line 729 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 725 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 694 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
|
inline |
Definition at line 699 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
|
inline |
Definition at line 704 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
|
inline |
Definition at line 709 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
|
inline |
Definition at line 733 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 748 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
Referenced by is_released().
|
inline |
Definition at line 745 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 742 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 760 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, foedus::xct::McsRwExtendedBlock::Field::Components::id_, is_reader(), kPredFlagReader, next_flag_is_waiting(), and pred_flag_is_waiting().
|
inline |
Definition at line 768 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, foedus::xct::McsRwExtendedBlock::Field::Components::id_, is_writer(), kPredFlagWriter, next_flag_is_waiting(), and pred_flag_is_waiting().
|
inline |
Definition at line 584 of file xct_id.hpp.
References is_writer().
Referenced by init_reader().
|
inline |
Definition at line 572 of file xct_id.hpp.
References get_next(), and kSuccReleased.
|
inline |
Definition at line 583 of file xct_id.hpp.
References kPredFlagWriter, and read_pred_flags().
Referenced by init_writer(), and is_reader().
|
inline |
Definition at line 738 of file xct_id.hpp.
References kSuccFlagWaiting.
|
inline |
Definition at line 739 of file xct_id.hpp.
References kSuccFlagSuccessorReader.
|
inline |
Definition at line 566 of file xct_id.hpp.
References ASSERT_ND, next_flag_is_granted(), pred_flag_is_granted(), and set_next().
|
inline |
Definition at line 675 of file xct_id.hpp.
References kSuccFlagSuccessorReader, and read_next_flags().
|
inline |
Definition at line 672 of file xct_id.hpp.
References kSuccFlagSuccessorClassMask, and read_next_flags().
Referenced by set_next_flag_reader_successor(), and set_next_flag_writer_successor().
|
inline |
Definition at line 678 of file xct_id.hpp.
References kSuccFlagSuccessorWriter, and read_next_flags().
|
inline |
Definition at line 681 of file xct_id.hpp.
References kSuccFlagBusy, and read_next_flags().
Referenced by set_next_flag_busy(), and unset_next_flag_busy().
|
inline |
Definition at line 591 of file xct_id.hpp.
References kSuccFlagDirectGranted, kSuccFlagMask, and read_next_flags().
|
inline |
Definition at line 599 of file xct_id.hpp.
References kSuccFlagDirectGranted, kSuccFlagMask, and read_next_flags().
Referenced by mark_released().
|
inline |
Definition at line 603 of file xct_id.hpp.
References kSuccFlagLeaving, and read_next_flags().
Referenced by set_next_flag_busy_granted(), and set_next_flag_granted().
|
inline |
Definition at line 595 of file xct_id.hpp.
References kSuccFlagLeavingGranted, kSuccFlagMask, and read_next_flags().
|
inline |
Definition at line 606 of file xct_id.hpp.
References kSuccFlagWaiting, and read_next_flags().
Referenced by init_reader(), init_writer(), set_next_flag_busy_granted(), and set_next_flag_granted().
|
inline |
Definition at line 588 of file xct_id.hpp.
References kPredFlagGranted, and read_pred_flags().
Referenced by mark_released(), pred_flag_is_waiting(), set_next_flag_busy_granted(), set_next_flag_granted(), and timeout_granted().
|
inline |
Definition at line 585 of file xct_id.hpp.
References pred_flag_is_granted().
Referenced by init_reader(), init_writer(), and set_pred_flag_granted().
|
inline |
Definition at line 580 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
Referenced by next_flag_has_reader_successor(), next_flag_has_successor(), next_flag_has_writer_successor(), next_flag_is_busy(), next_flag_is_direct_granted(), next_flag_is_granted(), next_flag_is_leaving(), next_flag_is_leaving_granted(), and next_flag_is_waiting().
|
inline |
Definition at line 577 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
Referenced by is_writer(), and pred_flag_is_granted().
|
inline |
Definition at line 668 of file xct_id.hpp.
References set_next_flag_granted(), and set_pred_flag_granted().
|
inline |
Definition at line 657 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::data_.
Referenced by mark_released().
|
inline |
Definition at line 684 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kSuccFlagBusy, and next_flag_is_busy().
|
inline |
Definition at line 636 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kSuccFlagBusy, next_flag_is_leaving(), next_flag_is_waiting(), and pred_flag_is_granted().
|
inline |
Definition at line 624 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kSuccFlagDirectGranted, kSuccFlagLeavingGranted, next_flag_is_leaving(), next_flag_is_waiting(), and pred_flag_is_granted().
Referenced by set_flags_granted().
|
inline |
Definition at line 648 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
|
inline |
Definition at line 653 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::flags_.
|
inline |
Definition at line 614 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kSuccFlagSuccessorReader, and next_flag_has_successor().
|
inline |
Definition at line 609 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kSuccFlagSuccessorWriter, and next_flag_has_successor().
|
inline |
Definition at line 754 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 619 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, kPredFlagGranted, and pred_flag_is_waiting().
Referenced by set_flags_granted().
|
inline |
Definition at line 751 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
bool foedus::xct::McsRwExtendedBlock::timeout_granted | ( | int32_t | timeout | ) |
Definition at line 148 of file xct_id.cpp.
References ASSERT_ND, kTimeoutNever, kTimeoutZero, pred_flag_is_granted(), foedus::assorted::spin_until(), and foedus::assorted::yield_if_valgrind().
|
inline |
Definition at line 689 of file xct_id.hpp.
References ASSERT_ND, foedus::xct::McsRwExtendedBlock::Field::components_, foedus::xct::McsRwExtendedBlock::Field::Components::flags_, and next_flag_is_busy().
|
inline |
Definition at line 714 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
inline |
Definition at line 757 of file xct_id.hpp.
References foedus::xct::McsRwExtendedBlock::Field::components_, and foedus::xct::McsRwExtendedBlock::Field::Components::id_.
|
static |
Definition at line 526 of file xct_id.hpp.
|
static |
Definition at line 523 of file xct_id.hpp.
Referenced by pred_flag_is_granted(), and set_pred_flag_granted().
|
static |
Definition at line 524 of file xct_id.hpp.
Referenced by init_reader().
|
static |
Pred flags: |—31—|--—|—0—| |my class|empty|waiting|.
Next flags: |--—31-30--—|--—|-2–|–1-0–| |successor class|empty|busy|waiting|
Definition at line 522 of file xct_id.hpp.
|
static |
Definition at line 525 of file xct_id.hpp.
Referenced by init_writer(), and is_writer().
|
static |
Definition at line 544 of file xct_id.hpp.
|
static |
Definition at line 534 of file xct_id.hpp.
Referenced by next_flag_is_busy(), set_next_flag_busy(), and set_next_flag_busy_granted().
|
static |
Definition at line 530 of file xct_id.hpp.
Referenced by next_flag_is_direct_granted(), next_flag_is_granted(), and set_next_flag_granted().
|
static |
Definition at line 529 of file xct_id.hpp.
Referenced by next_flag_is_leaving().
|
static |
Definition at line 531 of file xct_id.hpp.
Referenced by next_flag_is_leaving_granted(), and set_next_flag_granted().
|
static |
Definition at line 532 of file xct_id.hpp.
Referenced by next_flag_is_direct_granted(), next_flag_is_granted(), and next_flag_is_leaving_granted().
|
static |
Definition at line 536 of file xct_id.hpp.
Referenced by next_flag_has_successor().
|
static |
Definition at line 538 of file xct_id.hpp.
|
static |
Definition at line 537 of file xct_id.hpp.
Referenced by make_next_flag_waiting_with_reader_successor(), next_flag_has_reader_successor(), and set_next_flag_reader_successor().
|
static |
Definition at line 539 of file xct_id.hpp.
Referenced by next_flag_has_writer_successor(), and set_next_flag_writer_successor().
|
static |
Definition at line 528 of file xct_id.hpp.
Referenced by make_next_flag_waiting_with_no_successor(), and next_flag_is_waiting().
|
static |
Definition at line 542 of file xct_id.hpp.
|
static |
Definition at line 541 of file xct_id.hpp.
|
static |
Definition at line 547 of file xct_id.hpp.
Referenced by is_released().
|
static |
Definition at line 551 of file xct_id.hpp.
Referenced by foedus::xct::McsImpl< ADAPTOR, McsRwExtendedBlock >::acquire_unconditional_rw_reader(), foedus::xct::McsImpl< ADAPTOR, McsRwExtendedBlock >::acquire_unconditional_rw_writer(), and timeout_granted().
|
static |
Definition at line 552 of file xct_id.hpp.
Referenced by foedus::xct::McsImpl< ADAPTOR, McsRwExtendedBlock >::acquire_async_rw_reader(), foedus::xct::McsImpl< ADAPTOR, McsRwExtendedBlock >::acquire_async_rw_writer(), and timeout_granted().
Field foedus::xct::McsRwExtendedBlock::next_ |
Definition at line 563 of file xct_id.hpp.
Field foedus::xct::McsRwExtendedBlock::pred_ |
Definition at line 562 of file xct_id.hpp.