My Project
|
#include <mdl.h>
Public Types | |
enum | enum_wait_status { EMPTY = 0, GRANTED, VICTIM, TIMEOUT, KILLED } |
Public Member Functions | |
MDL_wait () | |
~MDL_wait () | |
bool | set_status (enum_wait_status result_arg) |
enum_wait_status | get_status () |
void | reset_status () |
enum_wait_status | timed_wait (MDL_context_owner *owner, struct timespec *abs_timeout, bool signal_timeout, const PSI_stage_info *wait_state_name) |
A reliable way to wait on an MDL lock.
Construct an empty wait slot.
Destroy system resources.
MDL_wait::enum_wait_status MDL_wait::get_status | ( | ) |
Query the current value of the wait slot.
void MDL_wait::reset_status | ( | ) |
Clear the current value of the wait slot.
bool MDL_wait::set_status | ( | enum_wait_status | status_arg | ) |
Set the status unless it's already set. Return FALSE if set, TRUE otherwise.
MDL_wait::enum_wait_status MDL_wait::timed_wait | ( | MDL_context_owner * | owner, |
struct timespec * | abs_timeout, | ||
bool | set_status_on_timeout, | ||
const PSI_stage_info * | wait_state_name | ||
) |
Wait for the status to be assigned to this wait slot.
owner | MDL context owner. |
abs_timeout | Absolute time after which waiting should stop. |
set_status_on_timeout | TRUE - If in case of timeout waiting context should close the wait slot by sending TIMEOUT to itself. FALSE - Otherwise. |
wait_state_name | Thread state name to be set for duration of wait. |