MySQL 8.0.31
Source Code Documentation
mysql_mutex.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_MUTEX_H
24#define COMPONENTS_SERVICES_MYSQL_MUTEX_H
25
28
29#define REQUIRES_MYSQL_MUTEX_SERVICE REQUIRES_SERVICE(mysql_mutex_v1)
30#define REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER \
31 REQUIRES_SERVICE_PLACEHOLDER(mysql_mutex_v1)
32
34
35#define MYSQL_MUTEX_CALL(M) mysql_service_mysql_mutex_v1->M
36
37#define mysql_mutex_register(P1, P2, P3) \
38 MYSQL_MUTEX_CALL(register_info)(P1, P2, P3)
39
40#define mysql_mutex_init(K, M, A) \
41 mysql_mutex_init_with_src(K, M, A, __FILE__, __LINE__)
42#define mysql_mutex_init_with_src(K, M, A, F, L) \
43 MYSQL_MUTEX_CALL(init)(K, M, A, F, L)
44
45#define mysql_mutex_destroy(M) \
46 mysql_mutex_destroy_with_src(M, __FILE__, __LINE__)
47#define mysql_mutex_destroy_with_src(M, F, L) MYSQL_MUTEX_CALL(destroy)(M, F, L)
48
49#define mysql_mutex_lock(M) mysql_mutex_lock_with_src(M, __FILE__, __LINE__)
50#define mysql_mutex_lock_with_src(M, F, L) MYSQL_MUTEX_CALL(lock)(M, F, L)
51
52#define mysql_mutex_trylock(M) \
53 mysql_mutex_trylock_with_src(M, __FILE__, __LINE__)
54#define mysql_mutex_trylock_with_src(M, F, L) MYSQL_MUTEX_CALL(trylock)(M, F, L)
55
56#define mysql_mutex_unlock(M) mysql_mutex_unlock_with_src(M, __FILE__, __LINE__)
57#define mysql_mutex_unlock_with_src(M, F, L) MYSQL_MUTEX_CALL(unlock)(M, F, L)
58
59#endif /* COMPONENTS_SERVICES_MYSQL_MUTEX_H */
Specifies macros to define Components.
#define REQUIRES_MYSQL_MUTEX_SERVICE_PLACEHOLDER
Definition: mysql_mutex.h:30