~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2008-11-07 00:15:51 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: monty@inaugust.com-20081107001551-8vxb6sf1ti0i5p09
Cleaned up some headers for PCH.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
The interface to the operating system
 
3
process control primitives
 
4
 
 
5
(c) 1995 Innobase Oy
 
6
 
 
7
Created 9/30/1995 Heikki Tuuri
 
8
*******************************************************/
 
9
 
 
10
#ifndef os0proc_h
 
11
#define os0proc_h
 
12
 
 
13
#include "univ.i"
 
14
 
 
15
#ifdef UNIV_LINUX
 
16
#include <sys/ipc.h>
 
17
#include <sys/shm.h>
 
18
#endif
 
19
 
 
20
typedef void*                   os_process_t;
 
21
typedef unsigned long int       os_process_id_t;
 
22
 
 
23
extern ibool os_use_large_pages;
 
24
/* Large page size. This may be a boot-time option on some platforms */
 
25
extern ulint os_large_page_size;
 
26
 
 
27
/********************************************************************
 
28
Converts the current process id to a number. It is not guaranteed that the
 
29
number is unique. In Linux returns the 'process number' of the current
 
30
thread. That number is the same as one sees in 'top', for example. In Linux
 
31
the thread id is not the same as one sees in 'top'. */
 
32
UNIV_INTERN
 
33
ulint
 
34
os_proc_get_number(void);
 
35
/*====================*/
 
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. */
 
46
UNIV_INTERN
 
47
void*
 
48
os_mem_alloc_large(
 
49
/*===============*/
 
50
                                        /* out: allocated memory */
 
51
        ulint*  n);                     /* in/out: number of bytes */
 
52
/********************************************************************
 
53
Frees large pages memory. */
 
54
UNIV_INTERN
 
55
void
 
56
os_mem_free_large(
 
57
/*==============*/
 
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 */
 
71
 
 
72
#ifndef UNIV_NONINL
 
73
#include "os0proc.ic"
 
74
#endif
 
75
 
 
76
#endif