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., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
17
*****************************************************************************/
19
/**************************************************//**
20
@file include/os0proc.h
1
/******************************************************
21
2
The interface to the operating system
22
3
process control primitives
24
7
Created 9/30/1995 Heikki Tuuri
25
8
*******************************************************/
41
24
/* Large page size. This may be a boot-time option on some platforms */
42
25
extern ulint os_large_page_size;
44
/****************************************************************//**
27
/********************************************************************
45
28
Converts the current process id to a number. It is not guaranteed that the
46
29
number is unique. In Linux returns the 'process number' of the current
47
30
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 */
31
the thread id is not the same as one sees in 'top'. */
52
34
os_proc_get_number(void);
53
35
/*====================*/
54
/****************************************************************//**
55
Allocates large pages memory.
56
@return allocated memory */
36
/********************************************************************
37
Allocates non-cacheable memory. */
42
/* out: allocated memory */
43
ulint n); /* in: number of bytes */
44
/********************************************************************
45
Allocates large pages memory. */
59
48
os_mem_alloc_large(
60
49
/*===============*/
61
ulint* n); /*!< in/out: number of bytes */
62
/****************************************************************//**
50
/* out: allocated memory */
51
ulint* n); /* in/out: number of bytes */
52
/********************************************************************
63
53
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() */
58
void *ptr, /* in: pointer returned by
59
os_mem_alloc_large() */
60
ulint size); /* in: size returned by
61
os_mem_alloc_large() */
62
/********************************************************************
63
Sets the priority boost for threads released from waiting within the current
67
os_process_set_priority_boost(
68
/*==========================*/
69
ibool do_boost); /* in: TRUE if priority boost should be done,
73
72
#ifndef UNIV_NONINL
74
73
#include "os0proc.ic"