MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MDL_wait Class Reference

#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)

Detailed Description

A reliable way to wait on an MDL lock.

Definition at line 687 of file mdl.h.

Constructor & Destructor Documentation

MDL_wait::MDL_wait ( )

Construct an empty wait slot.

Definition at line 1215 of file mdl.cc.

MDL_wait::~MDL_wait ( )

Destroy system resources.

Definition at line 1225 of file mdl.cc.

Member Function Documentation

MDL_wait::enum_wait_status MDL_wait::get_status ( )

Query the current value of the wait slot.

Definition at line 1254 of file mdl.cc.

Here is the caller graph for this function:

void MDL_wait::reset_status ( )

Clear the current value of the wait slot.

Definition at line 1266 of file mdl.cc.

Here is the caller graph for this function:

bool MDL_wait::set_status ( enum_wait_status  status_arg)

Set the status unless it's already set. Return FALSE if set, TRUE otherwise.

Definition at line 1237 of file mdl.cc.

Here is the caller graph for this function:

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.

Parameters
ownerMDL context owner.
abs_timeoutAbsolute time after which waiting should stop.
set_status_on_timeoutTRUE - If in case of timeout waiting context should close the wait slot by sending TIMEOUT to itself. FALSE - Otherwise.
wait_state_nameThread state name to be set for duration of wait.
Returns
Signal posted.

Definition at line 1289 of file mdl.cc.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: