MySQL 9.0.0
Source Code Documentation
mysql_rwlock.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENTS_SERVICES_MYSQL_RWLOCK_H
25#define COMPONENTS_SERVICES_MYSQL_RWLOCK_H
26
29
30#define REQUIRES_MYSQL_RWLOCK_SERVICE REQUIRES_SERVICE(mysql_rwlock_v1)
31#define REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER \
32 REQUIRES_SERVICE_PLACEHOLDER(mysql_rwlock_v1)
33
35
36#define MYSQL_RWLOCK_CALL(M) mysql_service_mysql_rwlock_v1->M
37
38#define mysql_rwlock_register(P1, P2, P3) \
39 MYSQL_RWLOCK_CALL(register_info)(P1, P2, P3)
40
41#define mysql_rwlock_init(K, T) \
42 mysql_rwlock_init_with_src(K, T, __FILE__, __LINE__)
43#define mysql_rwlock_init_with_src(K, T, F, L) \
44 MYSQL_RWLOCK_CALL(rwlock_init)(K, T, F, L)
45
46#define mysql_prlock_init(K, T) \
47 mysql_prlock_init_with_src(K, T, __FILE__, __LINE__)
48#define mysql_prlock_init_with_src(K, T, F, L) \
49 MYSQL_RWLOCK_CALL(prlock_init)(K, T, F, L)
50
51#define mysql_rwlock_destroy(T) \
52 mysql_rwlock_destroy_with_src(T, __FILE__, __LINE__)
53#define mysql_rwlock_destroy_with_src(T, F, L) \
54 MYSQL_RWLOCK_CALL(rwlock_destroy)(T, F, L)
55
56#define mysql_prlock_destroy(T) \
57 mysql_prlock_destroy_with_src(T, __FILE__, __LINE__)
58#define mysql_prlock_destroy_with_src(T, F, L) \
59 MYSQL_RWLOCK_CALL(prlock_destroy)(T, F, L)
60
61#define mysql_rwlock_rdlock(T) \
62 mysql_rwlock_rdlock_with_src(T, __FILE__, __LINE__)
63#define mysql_rwlock_rdlock_with_src(T, F, L) \
64 MYSQL_RWLOCK_CALL(rwlock_rdlock)(T, F, L)
65
66#define mysql_prlock_rdlock(T) \
67 mysql_prlock_rdlock_with_src(T, __FILE__, __LINE__)
68#define mysql_prlock_rdlock_with_src(T, F, L) \
69 MYSQL_RWLOCK_CALL(prlock_rdlock)(T, F, L)
70
71#define mysql_rwlock_wrlock(T) \
72 mysql_rwlock_wrlock_with_src(T, __FILE__, __LINE__)
73#define mysql_rwlock_wrlock_with_src(T, F, L) \
74 MYSQL_RWLOCK_CALL(rwlock_wrlock)(T, F, L)
75
76#define mysql_prlock_wrlock(T) \
77 mysql_prlock_wrlock_with_src(T, __FILE__, __LINE__)
78#define mysql_prlock_wrlock_with_src(T, F, L) \
79 MYSQL_RWLOCK_CALL(prlock_wrlock)(T, F, L)
80
81#define mysql_rwlock_tryrdlock(T) \
82 mysql_rwlock_tryrdlock_with_src(T, __FILE__, __LINE__)
83#define mysql_rwlock_tryrdlock_with_src(T, F, L) \
84 MYSQL_RWLOCK_CALL(rwlock_tryrdlock)(T, F, L)
85
86#define mysql_rwlock_trywrlock(T) \
87 mysql_rwlock_trywrlock_with_src(T, __FILE__, __LINE__)
88#define mysql_rwlock_trywrlock_with_src(T, F, L) \
89 MYSQL_RWLOCK_CALL(rwlock_trywrlock)(T, F, L)
90
91#define mysql_rwlock_unlock(T) \
92 mysql_rwlock_unlock_with_src(T, __FILE__, __LINE__)
93#define mysql_rwlock_unlock_with_src(T, F, L) \
94 MYSQL_RWLOCK_CALL(rwlock_unlock)(T, F, L)
95
96#define mysql_prlock_unlock(T) \
97 mysql_prlock_unlock_with_src(T, __FILE__, __LINE__)
98#define mysql_prlock_unlock_with_src(T, F, L) \
99 MYSQL_RWLOCK_CALL(prlock_unlock)(T, F, L)
100
101#endif /* COMPONENTS_SERVICES_MYSQL_RWLOCK_H */
Specifies macros to define Components.
#define REQUIRES_MYSQL_RWLOCK_SERVICE_PLACEHOLDER
Definition: mysql_rwlock.h:31