MySQL 9.0.0
Source Code Documentation
sync_cell_t Struct Reference

A cell where an individual thread may wait suspended until a resource is released. More...

#include <sync0arr_impl.h>

Public Attributes

sync_object_t latch
 pointer to the object the thread is waiting for; if NULL the cell is free for use More...
 
ulint request_type = 0
 lock type requested on the object More...
 
const char * file = nullptr
 in debug version file where requested More...
 
ulint line = 0
 in debug version line where requested More...
 
std::thread::id thread_id {}
 thread id of this waiting thread More...
 
bool waiting = false
 true if the thread has already called sync_array_event_wait on this cell More...
 
int64_t signal_count = 0
 We capture the signal_count of the latch when we reset the event. More...
 
std::chrono::steady_clock::time_point reservation_time {}
 Time when the thread reserved the wait cell. More...
 
uint64_t last_scan {0}
 Odd value means it is currently on-stack in a DFS search for cycles. More...
 

Detailed Description

A cell where an individual thread may wait suspended until a resource is released.

The suspending is implemented using an operating system event semaphore.

Member Data Documentation

◆ file

const char* sync_cell_t::file = nullptr

in debug version file where requested

◆ last_scan

uint64_t sync_cell_t::last_scan {0}

Odd value means it is currently on-stack in a DFS search for cycles.

Even value means it was completely processed. It is set to (odd) arr->last_scan when first visited, and then incremented again when all of its children are processed (and thus it is processed, too).

See also
arr->last_scan

◆ latch

sync_object_t sync_cell_t::latch

pointer to the object the thread is waiting for; if NULL the cell is free for use

◆ line

ulint sync_cell_t::line = 0

in debug version line where requested

◆ request_type

ulint sync_cell_t::request_type = 0

lock type requested on the object

◆ reservation_time

std::chrono::steady_clock::time_point sync_cell_t::reservation_time {}

Time when the thread reserved the wait cell.

◆ signal_count

int64_t sync_cell_t::signal_count = 0

We capture the signal_count of the latch when we reset the event.

This value is then passed on to os_event_wait and we wait only if the event has not been signalled in the period between the reset and wait call.

◆ thread_id

std::thread::id sync_cell_t::thread_id {}

thread id of this waiting thread

◆ waiting

bool sync_cell_t::waiting = false

true if the thread has already called sync_array_event_wait on this cell


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