89 const char *
file =
nullptr;
const std::string FILE("FILE")
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
The structure used in the spin lock implementation of a read-write lock.
Definition: sync0rw.h:363
Synchronization array.
Definition: sync0arr_impl.h:123
ulint next_free_slot
the next free cell in the array
Definition: sync0arr_impl.h:147
~sync_array_t() 1
Destructor.
Definition: sync0arr.cc:135
sync_cell_t * cells
pointer to wait array
Definition: sync0arr_impl.h:138
sync_array_t(ulint num_cells) 1
Constructor Creates a synchronization wait array.
Definition: sync0arr.cc:114
ulint res_count
count of cell reservations since creation of the array
Definition: sync0arr_impl.h:145
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:156
SysMutex mutex
System mutex protecting the data structure.
Definition: sync0arr_impl.h:139
ulint n_reserved
number of currently reserved cells in the wait array
Definition: sync0arr_impl.h:134
ulint first_free_slot
the last slot that was freed
Definition: sync0arr_impl.h:148
ulint n_cells
number of cells in the wait array
Definition: sync0arr_impl.h:136
A cell where an individual thread may wait suspended until a resource is released.
Definition: sync0arr_impl.h:83
ulint request_type
lock type requested on the object
Definition: sync0arr_impl.h:87
int64_t signal_count
We capture the signal_count of the latch when we reset the event.
Definition: sync0arr_impl.h:98
bool waiting
true if the thread has already called sync_array_event_wait on this cell
Definition: sync0arr_impl.h:95
std::chrono::steady_clock::time_point reservation_time
Time when the thread reserved the wait cell.
Definition: sync0arr_impl.h:108
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:84
std::thread::id thread_id
thread id of this waiting thread
Definition: sync0arr_impl.h:93
uint64_t last_scan
Odd value means it is currently on-stack in a DFS search for cycles.
Definition: sync0arr_impl.h:114
ulint line
in debug version line where requested
Definition: sync0arr_impl.h:91
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:65
static void sync_array_exit(sync_array_t *a)
Definition: sync0arr_impl.h:166
SyncArrayMutex::MutexType WaitMutex
Definition: sync0arr_impl.h:64
BlockSyncArrayMutex::MutexType BlockWaitMutex
Definition: sync0arr_impl.h:65
static void sync_array_enter(sync_array_t *a)
Definition: sync0arr_impl.h:167
sync_cell_t * sync_array_get_nth_cell(sync_array_t *arr, ulint n)
Gets the nth cell in array.
Definition: sync0arr.cc:147
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:375
ulint sync_array_size
Locally stored copy of srv_sync_array_size.
Definition: sync0arr.cc:61
The read-write lock (for threads, not for database transactions)
The latch types that use the sync array.
Definition: sync0arr_impl.h:68
BlockWaitMutex * bpmutex
Block mutex instance.
Definition: sync0arr_impl.h:76
WaitMutex * mutex
Mutex instance.
Definition: sync0arr_impl.h:73
#define UNIV_NOTHROW
Definition: univ.i:456
unsigned long int ulint
Definition: univ.i:406
#define mutex_exit(M)
Definition: ut0mutex.h:123
#define mutex_enter(M)
Definition: ut0mutex.h:117
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510
int n
Definition: xcom_base.cc:509