InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
ut0wqueue.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 2006, 2009, Oracle and/or its affiliates. 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.,
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17
*****************************************************************************/
18
19
/*******************************************************************/
26
/*******************************************************************/
32
#ifndef IB_WORK_QUEUE_H
33
#define IB_WORK_QUEUE_H
34
35
#include "
ut0list.h
"
36
#include "
mem0mem.h
"
37
#include "
os0sync.h
"
38
#include "
sync0types.h
"
39
40
struct
ib_wqueue_t
;
41
42
/****************************************************************/
45
UNIV_INTERN
46
ib_wqueue_t
*
47
ib_wqueue_create
(
void
);
48
/*===================*/
49
50
/****************************************************************/
52
UNIV_INTERN
53
void
54
ib_wqueue_free
(
55
/*===========*/
56
ib_wqueue_t
* wq);
58
/****************************************************************/
60
UNIV_INTERN
61
void
62
ib_wqueue_add
(
63
/*==========*/
64
ib_wqueue_t
* wq,
65
void
* item,
66
mem_heap_t
* heap);
69
/********************************************************************
70
Check if queue is empty. */
71
72
ibool
73
ib_wqueue_is_empty(
74
/*===============*/
75
/* out: TRUE if queue empty
76
else FALSE */
77
const
ib_wqueue_t
* wq);
/* in: work queue */
78
79
/****************************************************************/
82
UNIV_INTERN
83
void
*
84
ib_wqueue_wait
(
85
/*===========*/
86
ib_wqueue_t
* wq);
88
/********************************************************************
89
Wait for a work item to appear in the queue for specified time. */
90
91
void
*
92
ib_wqueue_timedwait(
93
/*================*/
94
/* out: work item or NULL on timeout*/
95
ib_wqueue_t
* wq,
/* in: work queue */
96
ib_time_t
wait_in_usecs);
/* in: wait time in micro seconds */
97
98
/* Work queue. */
99
struct
ib_wqueue_t
{
100
ib_mutex_t
mutex
;
101
ib_list_t
*
items
;
102
os_event_t
event
;
103
};
104
105
#endif
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2