MySQL  8.0.20
Source Code Documentation
mysql_cond_service.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2 
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6 
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef COMPONENTS_SERVICES_MYSQL_COND_SERVICE_H
24 #define COMPONENTS_SERVICES_MYSQL_COND_SERVICE_H
25 
30 
31 typedef void (*mysql_cond_register_t)(const char *category, PSI_cond_info *info,
32  int count);
33 
35  const char *src_file, unsigned int src_line);
36 
37 typedef int (*mysql_cond_destroy_t)(mysql_cond_t *that, const char *src_file,
38  unsigned int src_line);
39 
41  const char *src_file, unsigned int src_line);
42 
44  const struct timespec *abstime,
45  const char *src_file,
46  unsigned int src_line);
47 
48 typedef int (*mysql_cond_signal_t)(mysql_cond_t *that, const char *src_file,
49  unsigned int src_line);
50 
51 typedef int (*mysql_cond_broadcast)(mysql_cond_t *that, const char *src_file,
52  unsigned int src_line);
53 
55 mysql_cond_register_t register_info;
62 END_SERVICE_DEFINITION(mysql_cond_v1)
63 
64 #define REQUIRES_MYSQL_COND_SERVICE REQUIRES_SERVICE(mysql_cond_v1)
65 
66 #endif /* COMPONENTS_SERVICES_MYSQL_COND_SERVICE_H */
void(* mysql_cond_register_t)(const char *category, PSI_cond_info *info, int count)
Definition: mysql_cond_service.h:31
int(* mysql_cond_destroy_t)(mysql_cond_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:37
int(* mysql_cond_init_t)(PSI_cond_key key, mysql_cond_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:34
ssize_t count
Definition: memcached.c:386
An instrumented cond structure.
Definition: mysql_cond_bits.h:49
pthread_mutex_t mutex
Definition: memcached.c:384
Performance schema instrumentation interface.
Instrumentation helpers for conditions.
Condition information.
Definition: psi_cond_bits.h:85
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:570
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:41
int(* mysql_cond_wait_t)(mysql_cond_t *that, mysql_mutex_t *mutex, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:40
int(* mysql_cond_signal_t)(mysql_cond_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:48
int(* mysql_cond_broadcast)(mysql_cond_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:51
#define END_SERVICE_DEFINITION(name)
static const char * key
Definition: suite_stubs.c:14
static const char * category
Definition: sha2_password.cc:167
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49
ABI for instrumented mutexes.
void destroy(T *ptr)
Definition: my_alloc.h:381
Log info(cout, "NOTE")
#define BEGIN_SERVICE_DEFINITION(name)
int(* mysql_cond_timedwait_t)(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *src_file, unsigned int src_line)
Definition: mysql_cond_service.h:43
static time_t abstime(const rel_time_t exptime)
Convert the relative time to an absolute time (relative to EPOC ;) )
Definition: memcached.c:271