MySQL 8.0.30
Source Code Documentation
mysql_rwlock_service.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2022, 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 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_RWLOCK_SERVICE_H
24#define COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H
25
29
30typedef void (*mysql_rwlock_register_t)(const char *category,
32
34 const char *src_file, unsigned int src_line);
35
37 const char *src_file, unsigned int src_line);
38
40 const char *src_file,
41 unsigned int src_line);
42
44 const char *src_file,
45 unsigned int src_line);
46
47typedef int (*mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file,
48 unsigned int src_line);
49
50typedef int (*mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file,
51 unsigned int src_line);
52
53typedef int (*mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file,
54 unsigned int src_line);
55
56typedef int (*mysql_prlock_wrlock_t)(mysql_prlock_t *that, const char *src_file,
57 unsigned int src_line);
58
60 const char *src_file,
61 unsigned int src_line);
62
63/* No mysql_prlock_tryrdlock_t */
64
66 const char *src_file,
67 unsigned int src_line);
68
69/* No mysql_prlock_trywrlock_t */
70
71typedef int (*mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file,
72 unsigned int src_line);
73
74typedef int (*mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file,
75 unsigned int src_line);
76
87mysql_rwlock_tryrdlock_t rwlock_tryrdlock;
88mysql_rwlock_trywrlock_t rwlock_trywrlock;
91END_SERVICE_DEFINITION(mysql_rwlock_v1)
92
93#define REQUIRES_MYSQL_RWLOCK_SERVICE REQUIRES_SERVICE(mysql_rwlock_v1)
94
95#endif /* COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H */
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:43
static int count
Definition: myisam_ftdump.cc:42
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:56
int(* mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:71
void(* mysql_rwlock_register_t)(const char *category, PSI_rwlock_info *info, int count)
Definition: mysql_rwlock_service.h:30
int(* mysql_prlock_destroy_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:43
int(* mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:47
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:33
int(* mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:74
int(* mysql_rwlock_tryrdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:59
int(* mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:50
int(* mysql_rwlock_trywrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:65
int(* mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:53
int(* mysql_rwlock_destroy_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:39
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:36
Log info(cout, "NOTE")
static const char * category
Definition: sha2_password.cc:168
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:59
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
Rwlock information.
Definition: psi_rwlock_bits.h:161
An instrumented prlock structure.
Definition: mysql_rwlock_bits.h:71
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:50