MySQL  8.0.19
Source Code Documentation
mysql_rwlock_service.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 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 */
psi_rwlock_bits.h
mysql_prlock_rdlock_t
int(* mysql_prlock_rdlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:50
END_SERVICE_DEFINITION
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
BEGIN_SERVICE_DEFINITION
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
mysql_rwlock_trywrlock_t
int(* mysql_rwlock_trywrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:65
service.h
mysql_rwlock_t
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:50
mysql_rwlock_rdlock_t
int(* mysql_rwlock_rdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:47
key
static const char * key
Definition: suite_stubs.c:14
mysql_prlock_destroy_t
int(* mysql_prlock_destroy_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:43
mysql_rwlock_register_t
void(* mysql_rwlock_register_t)(const char *category, PSI_rwlock_info *info, int count)
Definition: mysql_rwlock_service.h:30
PSI_rwlock_info_v1
Rwlock information.
Definition: psi_rwlock_bits.h:159
mysql_rwlock_wrlock_t
int(* mysql_rwlock_wrlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:53
mysql_rwlock_bits.h
sha2_password::category
static const char * category
Definition: sha2_password.cc:167
mysql_prlock_wrlock_t
int(* mysql_prlock_wrlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:56
mysql_prlock_init_t
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
count
ssize_t count
Definition: memcached.c:386
mysql_rwlock_unlock_t
int(* mysql_rwlock_unlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:71
mysql_rwlock_tryrdlock_t
int(* mysql_rwlock_tryrdlock_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:59
PSI_rwlock_key
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:41
mysql_rwlock_destroy_t
int(* mysql_rwlock_destroy_t)(mysql_rwlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:39
mysql_prlock_t
An instrumented prlock structure.
Definition: mysql_rwlock_bits.h:71
mysql_rwlock_init_t
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
info
Log info(cout, "NOTE")
mysql_prlock_unlock_t
int(* mysql_prlock_unlock_t)(mysql_prlock_t *that, const char *src_file, unsigned int src_line)
Definition: mysql_rwlock_service.h:74