MySQL 9.1.0
Source Code Documentation
ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t Struct Reference

The type for a possible transition from one state to another while holding at least a given set of latches. More...

#include <ut0stateful_latching_rules.h>

Public Member Functions

 edge_t (node_t from, std::initializer_list< int > &&idxs, node_t to)
 Creates a description of one of allowed state transitions from given state to another while holding given latches. More...
 

Public Attributes

node_t m_from
 The old state from which the transition starts. More...
 
latches_set_t m_latches
 The required subset of latches for this particular transition. More...
 
node_t m_to
 The new state from to which the transition leads. More...
 

Detailed Description

template<typename Node, size_t LATCHES_COUNT>
struct ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t

The type for a possible transition from one state to another while holding at least a given set of latches.

Constructor & Destructor Documentation

◆ edge_t()

template<typename Node , size_t LATCHES_COUNT>
ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t::edge_t ( node_t  from,
std::initializer_list< int > &&  idxs,
node_t  to 
)
inline

Creates a description of one of allowed state transitions from given state to another while holding given latches.

For example {BUF_IO_READ, {0, 2}, BUF_IO_NONE} says a if a thread holds latches 0 and 2 then it can transition from BUF_IO_READ to BUF_IO_NONE.

Parameters
[in]fromThe old state from which the transition starts
[in]idxsThe list of integers in range <0,LATCHES_COUNT) used to construct set of latches for this edge.
[in]toThe new state from to which the transition leads.

Member Data Documentation

◆ m_from

template<typename Node , size_t LATCHES_COUNT>
node_t ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t::m_from

The old state from which the transition starts.

◆ m_latches

template<typename Node , size_t LATCHES_COUNT>
latches_set_t ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t::m_latches

The required subset of latches for this particular transition.

Note that there might be several edges for the same from->to pair, which means that a thread can pick any of them for which it has the required latches.

◆ m_to

template<typename Node , size_t LATCHES_COUNT>
node_t ut::Stateful_latching_rules< Node, LATCHES_COUNT >::edge_t::m_to

The new state from to which the transition leads.


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