1 /* Copyright (c) 2018, 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 #include "include/config.h"
24 
25 #include "include/pfs_cond_provider.h"
26 #include "include/pfs_mutex_provider.h"
27 #include "include/pfs_rwlock_provider.h"
28 #include "include/pfs_socket_provider.h"
29 #include "include/pfs_thread_provider.h"
30 #include "my_inttypes.h"
31 #include "mysql/components/services/psi_cond_bits.h"
32 #include "mysql/components/services/psi_mutex_bits.h"
33 #include "mysql/components/services/psi_rwlock_bits.h"
34 #include "mysql/components/services/psi_socket_bits.h"
35 #include "mysql/components/services/psi_stage_bits.h"
36 #include "mysql/components/services/psi_statement_bits.h"
37 #include "mysql/components/services/psi_thread_bits.h"
38 
39 #ifndef WITH_LOCK_ORDER
40 
41 #ifdef HAVE_PSI_COND_INTERFACE
pfs_broadcast_cond_v1(PSI_cond *)42 void pfs_broadcast_cond_v1(PSI_cond *) {}
pfs_destroy_cond_v1(PSI_cond *)43 void pfs_destroy_cond_v1(PSI_cond *) {}
pfs_end_cond_wait_v1(PSI_cond_locker *,int)44 void pfs_end_cond_wait_v1(PSI_cond_locker *, int) {}
pfs_init_cond_v1(PSI_cond_key,const void *)45 PSI_cond *pfs_init_cond_v1(PSI_cond_key, const void *) { return nullptr; }
pfs_register_cond_v1(char const *,PSI_cond_info_v1 *,int)46 void pfs_register_cond_v1(char const *, PSI_cond_info_v1 *, int) {}
pfs_signal_cond_v1(PSI_cond *)47 void pfs_signal_cond_v1(PSI_cond *) {}
pfs_start_cond_wait_v1(PSI_cond_locker_state *,PSI_cond *,PSI_mutex *,PSI_cond_operation,const char *,uint)48 PSI_cond_locker *pfs_start_cond_wait_v1(PSI_cond_locker_state *, PSI_cond *,
49                                         PSI_mutex *, PSI_cond_operation,
50                                         const char *, uint) {
51   return nullptr;
52 }
53 #endif  // HAVE_PSI_COND_INTERFACE
54 
55 #ifdef HAVE_PSI_MUTEX_INTERFACE
pfs_destroy_mutex_v1(PSI_mutex *)56 void pfs_destroy_mutex_v1(PSI_mutex *) {}
pfs_end_mutex_wait_v1(PSI_mutex_locker *,int)57 void pfs_end_mutex_wait_v1(PSI_mutex_locker *, int) {}
pfs_init_mutex_v1(PSI_mutex_key,const void *)58 PSI_mutex *pfs_init_mutex_v1(PSI_mutex_key, const void *) { return nullptr; }
pfs_register_mutex_v1(char const *,PSI_mutex_info_v1 *,int)59 void pfs_register_mutex_v1(char const *, PSI_mutex_info_v1 *, int) {}
pfs_start_mutex_wait_v1(PSI_mutex_locker_state_v1 *,PSI_mutex *,PSI_mutex_operation,char const *,uint)60 PSI_mutex_locker *pfs_start_mutex_wait_v1(PSI_mutex_locker_state_v1 *,
61                                           PSI_mutex *, PSI_mutex_operation,
62                                           char const *, uint) {
63   return nullptr;
64 }
pfs_unlock_mutex_v1(PSI_mutex *)65 void pfs_unlock_mutex_v1(PSI_mutex *) {}
66 #endif  // HAVE_PSI_MUTEX_INTERFACE
67 
68 #ifdef HAVE_PSI_RWLOCK_INTERFACE
pfs_destroy_rwlock_v2(PSI_rwlock *)69 void pfs_destroy_rwlock_v2(PSI_rwlock *) {}
pfs_end_rwlock_rdwait_v2(PSI_rwlock_locker *,int)70 void pfs_end_rwlock_rdwait_v2(PSI_rwlock_locker *, int) {}
pfs_end_rwlock_wrwait_v2(PSI_rwlock_locker *,int)71 void pfs_end_rwlock_wrwait_v2(PSI_rwlock_locker *, int) {}
pfs_init_rwlock_v2(PSI_rwlock_key,const void *)72 PSI_rwlock *pfs_init_rwlock_v2(PSI_rwlock_key, const void *) { return nullptr; }
pfs_register_rwlock_v2(char const *,PSI_rwlock_info_v1 *,int)73 void pfs_register_rwlock_v2(char const *, PSI_rwlock_info_v1 *, int) {}
pfs_start_rwlock_rdwait_v2(PSI_rwlock_locker_state_v1 *,PSI_rwlock *,PSI_rwlock_operation,char const *,uint)74 PSI_rwlock_locker *pfs_start_rwlock_rdwait_v2(PSI_rwlock_locker_state_v1 *,
75                                               PSI_rwlock *,
76                                               PSI_rwlock_operation,
77                                               char const *, uint) {
78   return nullptr;
79 }
pfs_start_rwlock_wrwait_v2(PSI_rwlock_locker_state_v1 *,PSI_rwlock *,PSI_rwlock_operation,char const *,uint)80 PSI_rwlock_locker *pfs_start_rwlock_wrwait_v2(PSI_rwlock_locker_state_v1 *,
81                                               PSI_rwlock *,
82                                               PSI_rwlock_operation,
83                                               char const *, uint) {
84   return nullptr;
85 }
pfs_unlock_rwlock_v2(PSI_rwlock *,PSI_rwlock_operation)86 void pfs_unlock_rwlock_v2(PSI_rwlock *, PSI_rwlock_operation) {}
87 #endif  // HAVE_PSI_RWLOCK_INTERFACE
88 
89 #ifdef HAVE_PSI_SOCKET_INTERFACE
pfs_destroy_socket_v1(PSI_socket *)90 void pfs_destroy_socket_v1(PSI_socket *) {}
pfs_end_socket_wait_v1(PSI_socket_locker *,size_t)91 void pfs_end_socket_wait_v1(PSI_socket_locker *, size_t) {}
pfs_init_socket_v1(PSI_socket_key,const my_socket *,const struct sockaddr *,socklen_t)92 PSI_socket *pfs_init_socket_v1(PSI_socket_key, const my_socket *,
93                                const struct sockaddr *, socklen_t) {
94   return nullptr;
95 }
pfs_register_socket_v1(char const *,PSI_socket_info_v1 *,int)96 void pfs_register_socket_v1(char const *, PSI_socket_info_v1 *, int) {}
pfs_set_socket_info_v1(PSI_socket *,const my_socket *,const struct sockaddr *,socklen_t)97 void pfs_set_socket_info_v1(PSI_socket *, const my_socket *,
98                             const struct sockaddr *, socklen_t) {}
pfs_set_socket_state_v1(PSI_socket *,PSI_socket_state)99 void pfs_set_socket_state_v1(PSI_socket *, PSI_socket_state) {}
pfs_set_socket_thread_owner_v1(PSI_socket *)100 void pfs_set_socket_thread_owner_v1(PSI_socket *) {}
pfs_start_socket_wait_v1(PSI_socket_locker_state_v1 *,PSI_socket *,PSI_socket_operation,size_t,char const *,uint)101 PSI_socket_locker *pfs_start_socket_wait_v1(PSI_socket_locker_state_v1 *,
102                                             PSI_socket *, PSI_socket_operation,
103                                             size_t, char const *, uint) {
104   return nullptr;
105 }
106 #endif  // HAVE_PSI_SOCKET_INTERFACE
107 
108 #ifdef HAVE_PSI_THREAD_INTERFACE
pfs_delete_current_thread_vc()109 void pfs_delete_current_thread_vc() {}
pfs_new_thread_vc(PSI_thread_key,const void *,ulonglong)110 PSI_thread *pfs_new_thread_vc(PSI_thread_key, const void *, ulonglong) {
111   return nullptr;
112 }
pfs_register_thread_vc(char const *,PSI_thread_info_v1 *,int)113 void pfs_register_thread_vc(char const *, PSI_thread_info_v1 *, int) {}
pfs_set_thread_account_vc(char const *,int,char const *,int)114 void pfs_set_thread_account_vc(char const *, int, char const *, int) {}
pfs_set_thread_os_id_vc(PSI_thread *)115 void pfs_set_thread_os_id_vc(PSI_thread *) {}
pfs_set_thread_vc(PSI_thread *)116 void pfs_set_thread_vc(PSI_thread *) {}
pfs_spawn_thread_vc(PSI_thread_key,my_thread_handle *,const my_thread_attr_t *,void * (*)(void *),void *)117 int pfs_spawn_thread_vc(PSI_thread_key, my_thread_handle *,
118                         const my_thread_attr_t *, void *(*)(void *), void *) {
119   return 0;
120 }
pfs_set_thread_connect_attrs_vc(char const *,unsigned int,void const *)121 int pfs_set_thread_connect_attrs_vc(char const *, unsigned int, void const *) {
122   return 0;
123 }
124 #endif  // HAVE_PSI_THREAD_INTERFACE
125 
126 #endif /* WITH_LOCK_ORDER */
127