Drizzled Public API Documentation

sync0arr.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /**************************************************/
26 #pragma once
27 #ifndef sync0arr_h
28 #define sync0arr_h
29 
30 #include "univ.i"
31 #include "ut0lst.h"
32 #include "ut0mem.h"
33 #include "os0thread.h"
34 
39 
41 #define SYNC_ARRAY_OS_MUTEX 1
42 #define SYNC_ARRAY_MUTEX 2
43 /* @} */
44 
45 /*******************************************************************/
50 UNIV_INTERN
53 /*==============*/
54  ulint n_cells,
56  ulint protection);
59 /******************************************************************/
61 UNIV_INTERN
62 void
64 /*============*/
65  sync_array_t* arr);
66 /******************************************************************/
69 UNIV_INTERN
70 void
72 /*====================*/
73  sync_array_t* arr,
74  void* object,
75  ulint type,
76  const char* file,
77  ulint line,
78  ulint* index);
79 /******************************************************************/
84 UNIV_INTERN
85 void
87 /*==================*/
88  sync_array_t* arr,
89  ulint index);
90 /******************************************************************/
93 UNIV_INTERN
94 void
96 /*=================*/
97  sync_array_t* arr,
98  ulint index);
99 /**********************************************************************/
101 UNIV_INTERN
102 void
104 /*========================*/
105  sync_array_t* arr);
106 /**********************************************************************/
110 UNIV_INTERN
111 void
113 /*====================================*/
114 /**********************************************************************/
117 UNIV_INTERN
118 ibool
120 /*========================*/
121  os_thread_id_t* waiter,
122  const void** sema)
123  __attribute__((nonnull));
124 /********************************************************************/
127 UNIV_INTERN
128 void
130 /*================*/
131  sync_array_t* arr);
132 /**********************************************************************/
134 UNIV_INTERN
135 void
137 /*==================*/
138  FILE* file,
139  sync_array_t* arr);
142 #ifndef UNIV_NONINL
143 #include "sync0arr.ic"
144 #endif
145 
146 #endif
UNIV_INTERN void sync_array_validate(sync_array_t *arr)
Definition: sync0arr.cc:300
UNIV_INTERN void sync_arr_wake_threads_if_sema_free(void)
Definition: sync0arr.cc:877
UNIV_INTERN void sync_array_wait_event(sync_array_t *arr, ulint index)
Definition: sync0arr.cc:418
UNIV_INTERN sync_array_t * sync_array_create(ulint n_cells, ulint protection)
Definition: sync0arr.cc:228
UNIV_INTERN ibool sync_array_print_long_waits(os_thread_id_t *waiter, const void **sema) __attribute__((nonnull))
Definition: sync0arr.cc:918
UNIV_INTERN void sync_array_free_cell(sync_array_t *arr, ulint index)
Definition: sync0arr.cc:825
os_thread_t os_thread_id_t
Definition: os0thread.h:53
UNIV_INTERN void sync_array_free(sync_array_t *arr)
Definition: sync0arr.cc:269
UNIV_INTERN void sync_array_reserve_cell(sync_array_t *arr, void *object, ulint type, const char *file, ulint line, ulint *index)
Definition: sync0arr.cc:346
UNIV_INTERN void sync_array_object_signalled(sync_array_t *arr)
Definition: sync0arr.cc:852
UNIV_INTERN void sync_array_print_info(FILE *file, sync_array_t *arr)
Definition: sync0arr.cc:1047