My Project
Public Types | Public Member Functions
MDL_wait Class Reference

#include <mdl.h>

List of all members.

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.


Constructor & Destructor Documentation

Construct an empty wait slot.

Destroy system resources.


Member Function Documentation

MDL_wait::enum_wait_status MDL_wait::get_status ( )

Query the current value of the wait slot.

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.

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.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines