MySQL  8.0.20
Source Code Documentation
mysql_rwlock_service.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, 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_RWLOCK_SERVICE_H
24 #define COMPONENTS_SERVICES_MYSQL_RWLOCK_SERVICE_H
25 
29 
30 typedef void (*mysql_rwlock_register_t)(const char *category,
31  PSI_rwlock_info *info, int count);
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 
47 typedef int (*mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file,
48  unsigned int src_line);
49 
50 typedef int (*mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file,
51  unsigned int src_line);
52 
53 typedef int (*mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file,
54  unsigned int src_line);
55 
56 typedef 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 
71 typedef int (*mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file,
72  unsigned int src_line);
73 
74 typedef int (*mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file,
75  unsigned int src_line);
76 
77 BEGIN_SERVICE_DEFINITION(mysql_rwlock_v1)
79 mysql_rwlock_init_t rwlock_init;
80 mysql_prlock_init_t prlock_init;
81 mysql_rwlock_destroy_t rwlock_destroy;
82 mysql_prlock_destroy_t prlock_destroy;
83 mysql_rwlock_rdlock_t rwlock_rdlock;
84 mysql_prlock_rdlock_t prlock_rdlock;
85 mysql_rwlock_wrlock_t rwlock_wrlock;
86 mysql_prlock_wrlock_t prlock_wrlock;
87 mysql_rwlock_tryrdlock_t rwlock_tryrdlock;
88 mysql_rwlock_trywrlock_t rwlock_trywrlock;
89 mysql_rwlock_unlock_t rwlock_unlock;
90 mysql_prlock_unlock_t prlock_unlock;
91 END_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 */
ssize_t count
Definition: memcached.c:386
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_unlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:74
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
int(* mysql_rwlock_destroy_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:39
void(* mysql_rwlock_register_t)(const char *category, PSI_rwlock_info *info, int count)
Definition: mysql_rwlock_service.h:30
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_rdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:47
An instrumented prlock structure.
Definition: mysql_rwlock_bits.h:71
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_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_rwlock_trywrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:65
#define END_SERVICE_DEFINITION(name)
Rwlock information.
Definition: psi_rwlock_bits.h:159
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:41
int(* mysql_prlock_destroy_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:43
static const char * key
Definition: suite_stubs.c:14
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:50
static const char * category
Definition: sha2_password.cc:167
int(* mysql_prlock_wrlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:56
Log info(cout, "NOTE")
Performance schema instrumentation interface.
#define BEGIN_SERVICE_DEFINITION(name)
Instrumentation helpers for rwlock.
int(* mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:71