MySQL  8.0.19
Source Code Documentation
mysql_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 COMPONENTS_SERVICES_MYSQL_RWLOCK_H
24 #define COMPONENTS_SERVICES_MYSQL_RWLOCK_H
25 
28 
29 REQUIRES_SERVICE_PLACEHOLDER(mysql_rwlock_v1);
30 
31 #define mysql_rwlock_register(P1, P2, P3) \
32  mysql_service_mysql_rwlock_v1->register_info(P1, P2, P3)
33 
34 #define mysql_rwlock_init(K, T) \
35  mysql_rwlock_init_with_src(K, T, __FILE__, __LINE__)
36 #define mysql_rwlock_init_with_src(K, T, F, L) \
37  mysql_service_mysql_rwlock_v1->rwlock_init(K, T, F, L)
38 
39 #define mysql_prlock_init(K, T) \
40  mysql_prlock_init_with_src(K, T, __FILE__, __LINE__)
41 #define mysql_prlock_init_with_src(K, T, F, L) \
42  mysql_service_mysql_rwlock_v1->prlock_init(K, T, F, L)
43 
44 #define mysql_rwlock_destroy(T) \
45  mysql_rwlock_destroy_with_src(T, __FILE__, __LINE__)
46 #define mysql_rwlock_destroy_with_src(T, F, L) \
47  mysql_service_mysql_rwlock_v1->rwlock_destroy(T, F, L)
48 
49 #define mysql_prlock_destroy(T) \
50  mysql_prlock_destroy_with_src(T, __FILE__, __LINE__)
51 #define mysql_prlock_destroy_with_src(T, F, L) \
52  mysql_service_mysql_rwlock_v1->prlock_destroy(T, F, L)
53 
54 #define mysql_rwlock_rdlock(T) \
55  mysql_rwlock_rdlock_with_src(T, __FILE__, __LINE__)
56 #define mysql_rwlock_rdlock_with_src(T, F, L) \
57  mysql_service_mysql_rwlock_v1->rwlock_rdlock(T, F, L)
58 
59 #define mysql_prlock_rdlock(T) \
60  mysql_prlock_rdlock_with_src(T, __FILE__, __LINE__)
61 #define mysql_prlock_rdlock_with_src(T, F, L) \
62  mysql_service_mysql_rwlock_v1->prlock_rdlock(T, F, L)
63 
64 #define mysql_rwlock_wrlock(T) \
65  mysql_rwlock_wrlock_with_src(T, __FILE__, __LINE__)
66 #define mysql_rwlock_wrlock_with_src(T, F, L) \
67  mysql_service_mysql_rwlock_v1->rwlock_wrlock(T, F, L)
68 
69 #define mysql_prlock_wrlock(T) \
70  mysql_prlock_wrlock_with_src(T, __FILE__, __LINE__)
71 #define mysql_prlock_wrlock_with_src(T, F, L) \
72  mysql_service_mysql_rwlock_v1->prlock_wrlock(T, F, L)
73 
74 #define mysql_rwlock_tryrdlock(T) \
75  mysql_rwlock_tryrdlock_with_src(T, __FILE__, __LINE__)
76 #define mysql_rwlock_tryrdlock_with_src(T, F, L) \
77  mysql_service_mysql_rwlock_v1->rwlock_tryrdlock(T, F, L)
78 
79 #define mysql_rwlock_trywrlock(T) \
80  mysql_rwlock_trywrlock_with_src(T, __FILE__, __LINE__)
81 #define mysql_rwlock_trywrlock_with_src(T, F, L) \
82  mysql_service_mysql_rwlock_v1->rwlock_trywrlock(T, F, L)
83 
84 #define mysql_rwlock_unlock(T) \
85  mysql_rwlock_unlock_with_src(T, __FILE__, __LINE__)
86 #define mysql_rwlock_unlock_with_src(T, F, L) \
87  mysql_service_mysql_rwlock_v1->rwlock_unlock(T, F, L)
88 
89 #define mysql_prlock_unlock(T) \
90  mysql_prlock_unlock_with_src(T, __FILE__, __LINE__)
91 #define mysql_prlock_unlock_with_src(T, F, L) \
92  mysql_service_mysql_rwlock_v1->prlock_unlock(T, F, L)
93 
94 #endif /* COMPONENTS_SERVICES_MYSQL_RWLOCK_H */
mysql_rwlock_service.h
component_implementation.h
REQUIRES_SERVICE_PLACEHOLDER
REQUIRES_SERVICE_PLACEHOLDER(mysql_rwlock_v1)