1/*****************************************************************************
2
3Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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.,
1551 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17*****************************************************************************/
18
19/**************************************************//**
20@file buf/buf0dump.h
21Implements a buffer pool dump/load.
22
23Created April 08, 2011 Vasil Dimov
24*******************************************************/
25
26#ifndef buf0dump_h
27#define buf0dump_h
28
29#include "univ.i"
30
31/*****************************************************************//**
32Wakes up the buffer pool dump/load thread and instructs it to start
33a dump. This function is called by MySQL code via buffer_pool_dump_now()
34and it should return immediately because the whole MySQL is frozen during
35its execution. */
36void
37buf_dump_start();
38/*============*/
39
40/*****************************************************************//**
41Wakes up the buffer pool dump/load thread and instructs it to start
42a load. This function is called by MySQL code via buffer_pool_load_now()
43and it should return immediately because the whole MySQL is frozen during
44its execution. */
45void
46buf_load_start();
47/*============*/
48
49/*****************************************************************//**
50Aborts a currently running buffer pool load. This function is called by
51MySQL code via buffer_pool_load_abort() and it should return immediately
52because the whole MySQL is frozen during its execution. */
53void
54buf_load_abort();
55/*============*/
56
57/*****************************************************************//**
58This is the main thread for buffer pool dump/load. It waits for an
59event and when waked up either performs a dump or load and sleeps
60again.
61@return this function does not return, it calls os_thread_exit() */
62extern "C"
63os_thread_ret_t
64DECLARE_THREAD(buf_dump_thread)(
65/*============================*/
66 void* arg); /*!< in: a dummy parameter
67 required by os_thread_create */
68
69#endif /* buf0dump_h */
70