1/*****************************************************************************
2
3Copyright (c) 1995, 2016, 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 include/fut0fut.h
21File-based utilities
22
23Created 12/13/1995 Heikki Tuuri
24***********************************************************************/
25
26
27#ifndef fut0fut_h
28#define fut0fut_h
29
30#include "univ.i"
31
32#include "fil0fil.h"
33#include "mtr0mtr.h"
34
35/** Gets a pointer to a file address and latches the page.
36@param[in] space space id
37@param[in] page_size page size
38@param[in] addr file address
39@param[in] rw_latch RW_S_LATCH, RW_X_LATCH, RW_SX_LATCH
40@param[out] ptr_block file page
41@param[in,out] mtr mini-transaction
42@return pointer to a byte in (*ptr_block)->frame; the *ptr_block is
43bufferfixed and latched */
44UNIV_INLINE
45byte*
46fut_get_ptr(
47 ulint space,
48 const page_size_t& page_size,
49 fil_addr_t addr,
50 rw_lock_type_t rw_latch,
51 mtr_t* mtr,
52 buf_block_t** ptr_block = NULL)
53 MY_ATTRIBUTE((warn_unused_result));
54
55#include "fut0fut.ic"
56
57#endif /* fut0fut_h */
58