88 const char *
file =
nullptr;
const std::string FILE("FILE")
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:78
The structure used in the spin lock implementation of a read-write lock.
Definition: sync0rw.h:359
Synchronization array.
Definition: sync0arr_impl.h:122
ulint next_free_slot
the next free cell in the array
Definition: sync0arr_impl.h:146
~sync_array_t() 1
Destructor.
Definition: sync0arr.cc:134
sync_cell_t * cells
pointer to wait array
Definition: sync0arr_impl.h:137
sync_array_t(ulint num_cells) 1
Constructor Creates a synchronization wait array.
Definition: sync0arr.cc:113
ulint res_count
count of cell reservations since creation of the array
Definition: sync0arr_impl.h:144
uint64_t last_scan
It is incremented by one at the beginning of search for deadlock cycles, and then again after the sca...
Definition: sync0arr_impl.h:155
SysMutex mutex
System mutex protecting the data structure.
Definition: sync0arr_impl.h:138
ulint n_reserved
number of currently reserved cells in the wait array
Definition: sync0arr_impl.h:133
ulint first_free_slot
the last slot that was freed
Definition: sync0arr_impl.h:147
ulint n_cells
number of cells in the wait array
Definition: sync0arr_impl.h:135
A cell where an individual thread may wait suspended until a resource is released.
Definition: sync0arr_impl.h:82
ulint request_type
lock type requested on the object
Definition: sync0arr_impl.h:86
int64_t signal_count
We capture the signal_count of the latch when we reset the event.
Definition: sync0arr_impl.h:97
bool waiting
true if the thread has already called sync_array_event_wait on this cell
Definition: sync0arr_impl.h:94
std::chrono::steady_clock::time_point reservation_time
Time when the thread reserved the wait cell.
Definition: sync0arr_impl.h:107
sync_object_t latch
pointer to the object the thread is waiting for; if NULL the cell is free for use
Definition: sync0arr_impl.h:83
std::thread::id thread_id
thread id of this waiting thread
Definition: sync0arr_impl.h:92
uint64_t last_scan
Odd value means it is currently on-stack in a DFS search for cycles.
Definition: sync0arr_impl.h:113
ulint line
in debug version line where requested
Definition: sync0arr_impl.h:90
The wait array used in synchronization primitives.
sync_array_t ** sync_wait_array
The global array of wait cells for implementation of the database's own mutexes and read-write locks.
Definition: sync0arr.cc:64
static void sync_array_exit(sync_array_t *a)
Definition: sync0arr_impl.h:165
SyncArrayMutex::MutexType WaitMutex
Definition: sync0arr_impl.h:63
BlockSyncArrayMutex::MutexType BlockWaitMutex
Definition: sync0arr_impl.h:64
static void sync_array_enter(sync_array_t *a)
Definition: sync0arr_impl.h:166
sync_cell_t * sync_array_get_nth_cell(sync_array_t *arr, ulint n)
Gets the nth cell in array.
Definition: sync0arr.cc:146
void sync_array_cell_print(FILE *file, const sync_cell_t *cell)
Reports info of a wait array cell into a file.
Definition: sync0arr.cc:374
ulint sync_array_size
Locally stored copy of srv_sync_array_size.
Definition: sync0arr.cc:60
The read-write lock (for threads, not for database transactions)
The latch types that use the sync array.
Definition: sync0arr_impl.h:67
BlockWaitMutex * bpmutex
Block mutex instance.
Definition: sync0arr_impl.h:75
WaitMutex * mutex
Mutex instance.
Definition: sync0arr_impl.h:72
#define UNIV_NOTHROW
Definition: univ.i:455
unsigned long int ulint
Definition: univ.i:405
#define mutex_exit(M)
Definition: ut0mutex.h:122
#define mutex_enter(M)
Definition: ut0mutex.h:116
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:509
int n
Definition: xcom_base.cc:508