1
/*****************************************************************************
3
Copyright (C) 1995, 2009, Innobase Oy. All Rights Reserved.
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.
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.
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
17
*****************************************************************************/
19
/**************************************************//**
20
@file include/os0proc.h
21
The interface to the operating system
22
process control primitives
24
Created 9/30/1995 Heikki Tuuri
25
*******************************************************/
37
typedef void* os_process_t;
38
typedef unsigned long int os_process_id_t;
40
extern ibool os_use_large_pages;
41
/* Large page size. This may be a boot-time option on some platforms */
42
extern ulint os_large_page_size;
44
/****************************************************************//**
45
Converts the current process id to a number. It is not guaranteed that the
46
number is unique. In Linux returns the 'process number' of the current
47
thread. That number is the same as one sees in 'top', for example. In Linux
48
the thread id is not the same as one sees in 'top'.
49
@return process id as a number */
52
os_proc_get_number(void);
53
/*====================*/
54
/****************************************************************//**
55
Allocates large pages memory.
56
@return allocated memory */
61
ulint* n); /*!< in/out: number of bytes */
62
/****************************************************************//**
63
Frees large pages memory. */
68
void *ptr, /*!< in: pointer returned by
69
os_mem_alloc_large() */
70
ulint size); /*!< in: size returned by
71
os_mem_alloc_large() */