~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/os0proc.h

  • Committer: Eric Herman
  • Date: 2008-12-07 15:29:44 UTC
  • mto: (656.1.14 devel)
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: eric@mysql.com-20081207152944-cq1nx1cyi0huqj0f
Added pointer to online version of the FAQ

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. 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., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
16
 
 
17
 
*****************************************************************************/
18
 
 
19
 
/**************************************************//**
20
 
@file include/os0proc.h
 
1
/******************************************************
21
2
The interface to the operating system
22
3
process control primitives
23
4
 
 
5
(c) 1995 Innobase Oy
 
6
 
24
7
Created 9/30/1995 Heikki Tuuri
25
8
*******************************************************/
26
9
 
41
24
/* Large page size. This may be a boot-time option on some platforms */
42
25
extern ulint os_large_page_size;
43
26
 
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'. */
50
32
UNIV_INTERN
51
33
ulint
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. */
 
38
UNIV_INTERN
 
39
void*
 
40
os_mem_alloc_nocache(
 
41
/*=================*/
 
42
                        /* out: allocated memory */
 
43
        ulint   n);     /* in: number of bytes */
 
44
/********************************************************************
 
45
Allocates large pages memory. */
57
46
UNIV_INTERN
58
47
void*
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. */
64
54
UNIV_INTERN
65
55
void
66
56
os_mem_free_large(
67
57
/*==============*/
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
 
64
process. */
 
65
UNIV_INTERN
 
66
void
 
67
os_process_set_priority_boost(
 
68
/*==========================*/
 
69
        ibool   do_boost);      /* in: TRUE if priority boost should be done,
 
70
                                FALSE if not */
72
71
 
73
72
#ifndef UNIV_NONINL
74
73
#include "os0proc.ic"