MySQL 8.0.40
Source Code Documentation
psi_rwlock.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_PSI_RWLOCK_H
25#define MYSQL_PSI_RWLOCK_H
26
27/**
28 @file include/mysql/psi/psi_rwlock.h
29 Performance schema instrumentation interface.
30
31 @defgroup psi_abi_rwlock Rwlock Instrumentation (ABI)
32 @ingroup psi_abi
33 @{
34*/
35
36#include "my_inttypes.h"
37#include "my_macros.h"
38
39/* HAVE_PSI_*_INTERFACE */
40#include "my_psi_config.h" // IWYU pragma: keep
41
42#include "my_sharedlib.h"
44
45/*
46 MAINTAINER:
47 The following pattern:
48 typedef struct XYZ XYZ;
49 is not needed in C++, but required for C.
50*/
51
52/** Entry point for the performance schema interface. */
54 /**
55 ABI interface finder.
56 Calling this method with an interface version number returns either
57 an instance of the ABI for this version, or NULL.
58 @sa PSI_RWLOCK_VERSION_1
59 @sa PSI_RWLOCK_VERSION_2
60 @sa PSI_CURRENT_RWLOCK_VERSION
61 */
62 void *(*get_interface)(int version);
63};
65
66#ifdef HAVE_PSI_RWLOCK_INTERFACE
67
68/**
69 Performance Schema Rwlock Interface, version 2.
70 @since PSI_RWLOCK_VERSION_2
71*/
73 /** @sa register_rwlock_v1_t. */
75 /** @sa init_rwlock_v1_t. */
77 /** @sa destroy_rwlock_v1_t. */
79 /** @sa start_rwlock_rdwait_v1_t. */
81 /** @sa end_rwlock_rdwait_v1_t. */
83 /** @sa start_rwlock_wrwait_v1_t. */
85 /** @sa end_rwlock_wrwait_v1_t. */
87 /** @sa unlock_rwlock_v2_t. */
89};
90
92
94
95#endif /* HAVE_PSI_RWLOCK_INTERFACE */
96
97/** @} (end of group psi_abi_rwlock) */
98
99#endif /* MYSQL_PSI_RWLOCK_H */
struct PSI_rwlock_locker *(* start_rwlock_wrwait_v1_t)(struct PSI_rwlock_locker_state_v1 *state, struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op, const char *src_file, unsigned int src_line)
Record a rwlock instrumentation write wait start event.
Definition: psi_rwlock_bits.h:267
void(* end_rwlock_rdwait_v1_t)(struct PSI_rwlock_locker *locker, int rc)
Record a rwlock instrumentation read wait end event.
Definition: psi_rwlock_bits.h:255
struct PSI_rwlock_locker *(* start_rwlock_rdwait_v1_t)(struct PSI_rwlock_locker_state_v1 *state, struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op, const char *src_file, unsigned int src_line)
Record a rwlock instrumentation read wait start event.
Definition: psi_rwlock_bits.h:246
void(* destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock)
Rwlock instrumentation destruction API.
Definition: psi_rwlock_bits.h:235
struct PSI_rwlock *(* init_rwlock_v1_t)(PSI_rwlock_key key, const void *identity)
Rwlock instrumentation initialization API.
Definition: psi_rwlock_bits.h:228
void(* end_rwlock_wrwait_v1_t)(struct PSI_rwlock_locker *locker, int rc)
Record a rwlock instrumentation write wait end event.
Definition: psi_rwlock_bits.h:276
void(* register_rwlock_v1_t)(const char *category, struct PSI_rwlock_info_v1 *info, int count)
Rwlock registration API.
Definition: psi_rwlock_bits.h:218
void(* unlock_rwlock_v2_t)(struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op)
Record a rwlock instrumentation unlock event.
Definition: psi_rwlock_bits.h:290
MYSQL_PLUGIN_IMPORT PSI_rwlock_service_t * psi_rwlock_service
Definition: psi_noop.cc:321
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Functions related to handling of plugins and other dynamically loaded libraries.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:71
Performance schema instrumentation interface.
required uint64 version
Definition: replication_group_member_actions.proto:41
Entry point for the performance schema interface.
Definition: psi_rwlock.h:53
Performance Schema Rwlock Interface, version 2.
Definition: psi_rwlock.h:72
register_rwlock_v1_t register_rwlock
Definition: psi_rwlock.h:74
end_rwlock_rdwait_v1_t end_rwlock_rdwait
Definition: psi_rwlock.h:82
start_rwlock_rdwait_v1_t start_rwlock_rdwait
Definition: psi_rwlock.h:80
end_rwlock_wrwait_v1_t end_rwlock_wrwait
Definition: psi_rwlock.h:86
start_rwlock_wrwait_v1_t start_rwlock_wrwait
Definition: psi_rwlock.h:84
destroy_rwlock_v1_t destroy_rwlock
Definition: psi_rwlock.h:78
unlock_rwlock_v2_t unlock_rwlock
Definition: psi_rwlock.h:88
init_rwlock_v1_t init_rwlock
Definition: psi_rwlock.h:76