MySQL 26.10.0
Source Code Documentation
mysql_rwlock_service.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2026, 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 COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H
25#define COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H
26
30
31typedef void (*mysql_rwlock_register_t)(const char *category,
33
35 const char *src_file, unsigned int src_line);
36
38 const char *src_file, unsigned int src_line);
39
41 const char *src_file,
42 unsigned int src_line);
43
45 const char *src_file,
46 unsigned int src_line);
47
48typedef int (*mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file,
49 unsigned int src_line);
50
51typedef int (*mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file,
52 unsigned int src_line);
53
54typedef int (*mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file,
55 unsigned int src_line);
56
57typedef int (*mysql_prlock_wrlock_t)(mysql_prlock_t *that, const char *src_file,
58 unsigned int src_line);
59
61 const char *src_file,
62 unsigned int src_line);
63
64/* No mysql_prlock_tryrdlock_t */
65
67 const char *src_file,
68 unsigned int src_line);
69
70/* No mysql_prlock_trywrlock_t */
71
72typedef int (*mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file,
73 unsigned int src_line);
74
75typedef int (*mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file,
76 unsigned int src_line);
77
92END_SERVICE_DEFINITION(mysql_rwlock_v1)
93
94#define REQUIRES_MYSQL_RWLOCK_SERVICE REQUIRES_SERVICE(mysql_rwlock_v1)
95
96#endif /* COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H */
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:44
static int count
Definition: myisam_ftdump.cc:45
Instrumentation helpers for rwlock.
int(* mysql_prlock_wrlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:57
int(* mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:72
void(* mysql_rwlock_register_t)(const char *category, PSI_rwlock_info *info, int count)
Definition: mysql_rwlock_service.h:31
int(* mysql_prlock_destroy_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:44
int(* mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:48
int(* mysql_rwlock_init_t)(PSI_rwlock_key key, mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:34
int(* mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:75
int(* mysql_rwlock_tryrdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:60
int(* mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:51
int(* mysql_rwlock_trywrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:66
int(* mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:54
int(* mysql_rwlock_destroy_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:40
int(* mysql_prlock_init_t)(PSI_rwlock_key key, mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:37
int rwlock_destroy(mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:78
int rwlock_tryrdlock(mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:86
int rwlock_init(PSI_rwlock_key, mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:72
int rwlock_rdlock(mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:82
int rwlock_trywrlock(mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:90
int rwlock_unlock(mysql_rwlock_t *lock, const char *, unsigned int)
Definition: health_monitor_disk_forecast_reset-t.cc:94
int rwlock_wrlock(mysql_rwlock_t *lock, const char *file, int line)
Acquire a write lock.
Definition: health_monitor_lock.cc:68
static const char * category
Definition: sha2_password.cc:190
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
Rwlock information.
Definition: psi_rwlock_bits.h:162
An instrumented prlock structure.
Definition: mysql_rwlock_bits.h:72
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:51