MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hp_static.c
1 /* Copyright (c) 2000, 2011, 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 as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 /*
17  Static variables for heap library. All definied here for easy making of
18  a shared library
19 */
20 
21 #ifndef MY_GLOBAL_INCLUDED
22 #include "heapdef.h"
23 #endif
24 
25 LIST *heap_open_list=0,*heap_share_list=0;
26 
27 #ifdef HAVE_PSI_INTERFACE
28 PSI_mutex_key hp_key_mutex_HP_SHARE_intern_lock;
29 
30 static PSI_mutex_info all_heap_mutexes[]=
31 {
32  { & hp_key_mutex_HP_SHARE_intern_lock, "HP_SHARE::intern_lock", 0}
33  /*
34  Note:
35  THR_LOCK_heap is part of mysys, not storage/heap.
36  */
37 };
38 
39 void init_heap_psi_keys()
40 {
41  const char* category= "memory";
42  int count;
43 
44  count= array_elements(all_heap_mutexes);
45  mysql_mutex_register(category, all_heap_mutexes, count);
46 }
47 #endif /* HAVE_PSI_INTERFACE */
48 
49