MySQL 5.6.14 Source Code Document
|
#include <pfs_lock.h>
Public Member Functions | |
bool | is_free (void) |
bool | is_populated (void) |
bool | free_to_dirty (void) |
void | allocated_to_dirty (void) |
void | dirty_to_allocated (void) |
void | set_allocated (void) |
void | dirty_to_free (void) |
void | allocated_to_free (void) |
void | begin_optimistic_lock (struct pfs_lock *copy) |
bool | end_optimistic_lock (struct pfs_lock *copy) |
uint32 | get_version () |
Public Attributes | |
volatile uint32 | m_version_state |
A 'lock' protecting performance schema internal buffers. This lock is used to mark the state of a record. Access to the record is not enforced here, it's up to the readers and writers to look at the record state before making an actual read or write operation.
Definition at line 64 of file pfs_lock.h.
|
inline |
Execute an allocated to dirty transition. This transition should be executed by the writer that owns the record, before the record is modified.
Definition at line 118 of file pfs_lock.h.
|
inline |
Execute an allocated to free transition. This transition should be executed by the writer that owns the record.
Definition at line 176 of file pfs_lock.h.
|
inline |
Start an optimistic read operation.
Definition at line 208 of file pfs_lock.h.
|
inline |
Execute a dirty to allocated transition. This transition should be executed by the writer that owns the record, after the record is in a state ready to be read.
Definition at line 134 of file pfs_lock.h.
|
inline |
Execute a dirty to free transition. This transition should be executed by the writer that owns the record.
Definition at line 162 of file pfs_lock.h.
|
inline |
End an optimistic read operation.
Definition at line 218 of file pfs_lock.h.
|
inline |
Execute a free to dirty transition. This transition is safe to execute concurrently by multiple writers. Only one writer will succeed to acquire the record.
Definition at line 104 of file pfs_lock.h.
|
inline |
Returns true if the record is free.
Definition at line 85 of file pfs_lock.h.
|
inline |
Returns true if the record contains values that can be read.
Definition at line 92 of file pfs_lock.h.
|
inline |
Initialize a lock to allocated. This transition should be executed by the writer that owns the record and the lock, after the record is in a state ready to be read.
Definition at line 149 of file pfs_lock.h.
volatile uint32 pfs_lock::m_version_state |
The record internal version and state
Definition at line 82 of file pfs_lock.h.