MySQL  8.0.19
Source Code Documentation
psi_rwlock.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, 2019, 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 MYSQL_PSI_RWLOCK_H
24 #define MYSQL_PSI_RWLOCK_H
25 
26 /**
27  @file include/mysql/psi/psi_rwlock.h
28  Performance schema instrumentation interface.
29 
30  @defgroup psi_abi_rwlock Rwlock Instrumentation (ABI)
31  @ingroup psi_abi
32  @{
33 */
34 
35 #include "my_inttypes.h"
36 #include "my_macros.h"
37 #include "my_psi_config.h" // IWYU pragma: keep
38 #include "my_sharedlib.h"
40 #include "psi_base.h"
41 
42 /*
43  MAINTAINER:
44  The following pattern:
45  typedef struct XYZ XYZ;
46  is not needed in C++, but required for C.
47 */
48 
49 /** Entry point for the performance schema interface. */
51  /**
52  ABI interface finder.
53  Calling this method with an interface version number returns either
54  an instance of the ABI for this version, or NULL.
55  @sa PSI_RWLOCK_VERSION_1
56  @sa PSI_RWLOCK_VERSION_2
57  @sa PSI_CURRENT_RWLOCK_VERSION
58  */
59  void *(*get_interface)(int version);
60 };
62 
63 #ifdef HAVE_PSI_RWLOCK_INTERFACE
64 
65 /**
66  Performance Schema Rwlock Interface, version 2.
67  @since PSI_RWLOCK_VERSION_2
68 */
70  /** @sa register_rwlock_v1_t. */
72  /** @sa init_rwlock_v1_t. */
74  /** @sa destroy_rwlock_v1_t. */
76  /** @sa start_rwlock_rdwait_v1_t. */
78  /** @sa end_rwlock_rdwait_v1_t. */
80  /** @sa start_rwlock_wrwait_v1_t. */
82  /** @sa end_rwlock_wrwait_v1_t. */
84  /** @sa unlock_rwlock_v2_t. */
86 };
87 
89 
91 
92 #endif /* HAVE_PSI_RWLOCK_INTERFACE */
93 
94 /** @} (end of group psi_abi_rwlock) */
95 
96 #endif /* MYSQL_PSI_RWLOCK_H */
psi_rwlock_bits.h
psi_rwlock_service
MYSQL_PLUGIN_IMPORT PSI_rwlock_service_t * psi_rwlock_service
Definition: psi_noop.cc:297
PSI_rwlock_service_v2::end_rwlock_wrwait
end_rwlock_wrwait_v1_t end_rwlock_wrwait
Definition: psi_rwlock.h:83
psi_base.h
init_rwlock_v1_t
struct PSI_rwlock *(* init_rwlock_v1_t)(PSI_rwlock_key key, const void *identity)
Rwlock instrumentation initialization API.
Definition: psi_rwlock_bits.h:225
version
const string version("\"Version\"")
PSI_rwlock_bootstrap
Entry point for the performance schema interface.
Definition: psi_rwlock.h:50
my_psi_config.h
register_rwlock_v1_t
void(* register_rwlock_v1_t)(const char *category, struct PSI_rwlock_info_v1 *info, int count)
Rwlock registration API.
Definition: psi_rwlock_bits.h:215
PSI_rwlock_service_v2::start_rwlock_wrwait
start_rwlock_wrwait_v1_t start_rwlock_wrwait
Definition: psi_rwlock.h:81
MYSQL_PLUGIN_IMPORT
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
end_rwlock_rdwait_v1_t
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:252
my_inttypes.h
destroy_rwlock_v1_t
void(* destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock)
Rwlock instrumentation destruction API.
Definition: psi_rwlock_bits.h:232
PSI_rwlock_service_v2::init_rwlock
init_rwlock_v1_t init_rwlock
Definition: psi_rwlock.h:73
start_rwlock_wrwait_v1_t
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:264
PSI_rwlock_service_v2::register_rwlock
register_rwlock_v1_t register_rwlock
Definition: psi_rwlock.h:71
unlock_rwlock_v2_t
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:287
PSI_rwlock_service_v2
Performance Schema Rwlock Interface, version 2.
Definition: psi_rwlock.h:69
PSI_rwlock_service_v2::unlock_rwlock
unlock_rwlock_v2_t unlock_rwlock
Definition: psi_rwlock.h:85
end_rwlock_wrwait_v1_t
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:273
PSI_rwlock_service_v2::start_rwlock_rdwait
start_rwlock_rdwait_v1_t start_rwlock_rdwait
Definition: psi_rwlock.h:77
my_sharedlib.h
PSI_rwlock_service_v2::end_rwlock_rdwait
end_rwlock_rdwait_v1_t end_rwlock_rdwait
Definition: psi_rwlock.h:79
my_macros.h
PSI_rwlock_service_v2::destroy_rwlock
destroy_rwlock_v1_t destroy_rwlock
Definition: psi_rwlock.h:75
start_rwlock_rdwait_v1_t
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:243