drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
sync0arr.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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/*******************************************************************/
50UNIV_INTERN
53/*==============*/
54 ulint n_cells,
56 ulint protection);
59/******************************************************************/
61UNIV_INTERN
62void
64/*============*/
65 sync_array_t* arr);
66/******************************************************************/
69UNIV_INTERN
70void
72/*====================*/
73 sync_array_t* arr,
74 void* object,
75 ulint type,
76 const char* file,
77 ulint line,
78 ulint* index);
79/******************************************************************/
84UNIV_INTERN
85void
87/*==================*/
88 sync_array_t* arr,
89 ulint index);
90/******************************************************************/
93UNIV_INTERN
94void
96/*=================*/
97 sync_array_t* arr,
98 ulint index);
99/**********************************************************************/
101UNIV_INTERN
102void
104/*========================*/
105 sync_array_t* arr);
106/**********************************************************************/
110UNIV_INTERN
111void
113/*====================================*/
114/**********************************************************************/
117UNIV_INTERN
118ibool
120/*========================*/
121 os_thread_id_t* waiter,
122 const void** sema)
123 __attribute__((nonnull));
124/********************************************************************/
127UNIV_INTERN
128void
130/*================*/
131 sync_array_t* arr);
132/**********************************************************************/
134UNIV_INTERN
135void
137/*==================*/
138 FILE* file,
139 sync_array_t* arr);
140
141
142#ifndef UNIV_NONINL
143#include "sync0arr.ic"
144#endif
145
146#endif
os_thread_t os_thread_id_t
Definition os0thread.h:53
struct sync_cell_struct sync_cell_t
Definition sync0arr.h:36
UNIV_INTERN void sync_array_object_signalled(sync_array_t *arr)
Definition sync0arr.cc:852
UNIV_INTERN void sync_array_wait_event(sync_array_t *arr, ulint index)
Definition sync0arr.cc:418
UNIV_INTERN void sync_array_print_info(FILE *file, sync_array_t *arr)
Definition sync0arr.cc:1047
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_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_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_free_cell(sync_array_t *arr, ulint index)
Definition sync0arr.cc:825
UNIV_INTERN sync_array_t * sync_array_create(ulint n_cells, ulint protection)
Definition sync0arr.cc:228
UNIV_INTERN void sync_array_free(sync_array_t *arr)
Definition sync0arr.cc:269
struct sync_array_struct sync_array_t
Definition sync0arr.h:38