CUBRID Engine  latest
cubsync::critical_section_tracker Class Reference

#include <critical_section_tracker.hpp>

Collaboration diagram for cubsync::critical_section_tracker:
Collaboration graph

Classes

struct  cstrack_entry
 

Public Member Functions

 critical_section_tracker (bool enable=false)
 
void start (void)
 
void stop (void)
 
void clear_all (void)
 
void on_enter_as_reader (int cs_index)
 
void on_enter_as_writer (int cs_index)
 
void on_promote (int cs_index)
 
void on_demote (int cs_index)
 
void on_exit (int cs_index)
 

Static Public Attributes

static const std::size_t MAX_REENTERS = 8
 

Private Member Functions

bool is_started (void)
 
void check (void)
 
void check_csect_interdependencies (int cs_index)
 

Private Attributes

cstrack_entry m_cstrack_array [CRITICAL_SECTION_COUNT]
 
bool m_enabled
 
std::uint8_t m_start_count
 

Detailed Description

Definition at line 32 of file critical_section_tracker.hpp.

Constructor & Destructor Documentation

cubsync::critical_section_tracker::critical_section_tracker ( bool  enable = false)

Definition at line 49 of file critical_section_tracker.cpp.

References m_enabled, and m_start_count.

Member Function Documentation

void cubsync::critical_section_tracker::check_csect_interdependencies ( int  cs_index)
private

Definition at line 186 of file critical_section_tracker.cpp.

References CSECT_CT_OID_TABLE, CSECT_LOCATOR_SR_CLASSNAME_TABLE, cubsync::cstrack_assert(), and m_cstrack_array.

Referenced by on_enter_as_reader(), and on_enter_as_writer().

Here is the caller graph for this function:

void cubsync::critical_section_tracker::clear_all ( void  )

Definition at line 260 of file critical_section_tracker.cpp.

References check(), CRITICAL_SECTION_COUNT, m_cstrack_array, and m_start_count.

Referenced by cubthread::entry::end_resource_tracks(), and stop().

Here is the caller graph for this function:

bool cubsync::critical_section_tracker::is_started ( void  )
private

Definition at line 195 of file critical_section_tracker.cpp.

References m_start_count.

Referenced by on_demote(), on_enter_as_reader(), on_enter_as_writer(), on_exit(), and on_promote().

Here is the caller graph for this function:

void cubsync::critical_section_tracker::start ( void  )

Definition at line 201 of file critical_section_tracker.cpp.

References m_enabled, and m_start_count.

Referenced by cubthread::entry::push_resource_tracks().

Here is the caller graph for this function:

void cubsync::critical_section_tracker::stop ( void  )

Definition at line 211 of file critical_section_tracker.cpp.

References clear_all(), cubsync::cstrack_assert(), m_enabled, and m_start_count.

Referenced by cubthread::entry::pop_resource_tracks().

Here is the caller graph for this function:

Member Data Documentation

cstrack_entry cubsync::critical_section_tracker::m_cstrack_array[CRITICAL_SECTION_COUNT]
private
bool cubsync::critical_section_tracker::m_enabled
private
std::uint8_t cubsync::critical_section_tracker::m_start_count
private
const std::size_t cubsync::critical_section_tracker::MAX_REENTERS = 8
static

Definition at line 38 of file critical_section_tracker.hpp.

Referenced by on_enter_as_reader().


The documentation for this class was generated from the following files: