MySQL 8.4.2
Source Code Documentation
thr_cond.h File Reference

MySQL condition variable implementation. More...

#include <stddef.h>
#include <sys/types.h>
#include "my_macros.h"
#include "my_thread.h"
#include "mysql/components/services/bits/thr_cond_bits.h"
#include "thr_mutex.h"

Go to the source code of this file.

Functions

static int native_cond_init (native_cond_t *cond)
 
static int native_cond_destroy (native_cond_t *cond)
 
static int native_cond_timedwait (native_cond_t *cond, native_mutex_t *mutex, const struct timespec *abstime)
 
static int native_cond_wait (native_cond_t *cond, native_mutex_t *mutex)
 
static int native_cond_signal (native_cond_t *cond)
 
static int native_cond_broadcast (native_cond_t *cond)
 
static int my_cond_timedwait (native_cond_t *cond, my_mutex_t *mp, const struct timespec *abstime)
 
static int my_cond_wait (native_cond_t *cond, my_mutex_t *mp)
 

Detailed Description

MySQL condition variable implementation.

There are three "layers": 1) native_cond_*() Functions that map directly down to OS primitives. Windows - ConditionVariable Other OSes - pthread 2) my_cond_*() Functions that use SAFE_MUTEX (default for debug). Otherwise native_cond_*() is used. 3) mysql_cond*() Functions that include Performance Schema instrumentation. See include/mysql/psi/mysql_thread.h

Function Documentation

◆ my_cond_timedwait()

static int my_cond_timedwait ( native_cond_t cond,
my_mutex_t mp,
const struct timespec *  abstime 
)
inlinestatic

◆ my_cond_wait()

static int my_cond_wait ( native_cond_t cond,
my_mutex_t mp 
)
inlinestatic

◆ native_cond_broadcast()

static int native_cond_broadcast ( native_cond_t cond)
inlinestatic

◆ native_cond_destroy()

static int native_cond_destroy ( native_cond_t cond)
inlinestatic

◆ native_cond_init()

static int native_cond_init ( native_cond_t cond)
inlinestatic

◆ native_cond_signal()

static int native_cond_signal ( native_cond_t cond)
inlinestatic

◆ native_cond_timedwait()

static int native_cond_timedwait ( native_cond_t cond,
native_mutex_t mutex,
const struct timespec *  abstime 
)
inlinestatic

◆ native_cond_wait()

static int native_cond_wait ( native_cond_t cond,
native_mutex_t mutex 
)
inlinestatic