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