1 | /** @file
|
---|
2 | *
|
---|
3 | * InnoTek Portable Runtime - Runtime Init/Term.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * If you received this file as part of a commercial VirtualBox
|
---|
18 | * distribution, then only the terms of your commercial VirtualBox
|
---|
19 | * license agreement apply instead of the previous paragraph.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef __iprt_Runtime_h__
|
---|
23 | #define __iprt_Runtime_h__
|
---|
24 |
|
---|
25 | #include <iprt/cdefs.h>
|
---|
26 | #include <iprt/types.h>
|
---|
27 |
|
---|
28 |
|
---|
29 | __BEGIN_DECLS
|
---|
30 |
|
---|
31 | /** @defgroup grp_rt InnoTek Portable Runtime APIs
|
---|
32 | * @{
|
---|
33 | */
|
---|
34 |
|
---|
35 | /** @defgroup grp_rt_initterm Init / Term
|
---|
36 | * @{
|
---|
37 | */
|
---|
38 |
|
---|
39 | #ifdef IN_RING3
|
---|
40 | /**
|
---|
41 | * Initalizes the runtime library.
|
---|
42 | *
|
---|
43 | * @returns iprt status code.
|
---|
44 | *
|
---|
45 | * @param fInitSUPLib Set if SUPInit() shall be called during init (default).
|
---|
46 | * Clear if not to call it.
|
---|
47 | * @param cbReserve The number of bytes of contiguous memory that should be reserved by
|
---|
48 | * the runtime / support library.
|
---|
49 | * Set this to 0 if no reservation is required. (default)
|
---|
50 | * Set this to ~(size_t)0 if the maximum amount supported by the VM is to be
|
---|
51 | * attempted reserved, or the maximum available.
|
---|
52 | * This argument only applies if fInitSUPLib is true and we're in ring-3 HC.
|
---|
53 | */
|
---|
54 | RTR3DECL(int) RTR3Init(
|
---|
55 | #ifdef __cplusplus
|
---|
56 | bool fInitSUPLib = true,
|
---|
57 | size_t cbReserve = 0
|
---|
58 | #else
|
---|
59 | bool fInitSUPLib,
|
---|
60 | size_t cbReserve
|
---|
61 | #endif
|
---|
62 | );
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * Terminates the runtime library.
|
---|
66 | */
|
---|
67 | RTR3DECL(void) RTR3Term(void);
|
---|
68 | #endif
|
---|
69 |
|
---|
70 |
|
---|
71 | #ifdef IN_RING0
|
---|
72 | /**
|
---|
73 | * Initalizes the ring-0 driver runtime library.
|
---|
74 | *
|
---|
75 | * @returns iprt status code.
|
---|
76 | * @param fReserved Flags reserved for the future.
|
---|
77 | */
|
---|
78 | RTR0DECL(int) RTR0Init(unsigned fReserved);
|
---|
79 |
|
---|
80 | /**
|
---|
81 | * Terminates the ring-0 driver runtime library.
|
---|
82 | */
|
---|
83 | RTR0DECL(void) RTR0Term(void);
|
---|
84 | #endif
|
---|
85 |
|
---|
86 | /** @} */
|
---|
87 |
|
---|
88 | /** @} */
|
---|
89 |
|
---|
90 | __END_DECLS
|
---|
91 |
|
---|
92 |
|
---|
93 | #endif
|
---|
94 |
|
---|