1 | /** @file
|
---|
2 | * IPRT - Runtime Init/Term.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * The contents of this file may alternatively be used under the terms
|
---|
17 | * of the Common Development and Distribution License Version 1.0
|
---|
18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | * CDDL are applicable instead of those of the GPL.
|
---|
21 | *
|
---|
22 | * You may elect to license modified versions of this file under the
|
---|
23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | *
|
---|
25 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
26 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
27 | * additional information or have any questions.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef ___iprt_initterm_h
|
---|
31 | #define ___iprt_initterm_h
|
---|
32 |
|
---|
33 | #include <iprt/cdefs.h>
|
---|
34 | #include <iprt/types.h>
|
---|
35 |
|
---|
36 | __BEGIN_DECLS
|
---|
37 |
|
---|
38 | /** @defgroup grp_rt IPRT APIs
|
---|
39 | * @{
|
---|
40 | */
|
---|
41 |
|
---|
42 | /** @defgroup grp_rt_initterm Init / Term
|
---|
43 | * @{
|
---|
44 | */
|
---|
45 |
|
---|
46 | #ifdef IN_RING3
|
---|
47 | /**
|
---|
48 | * Initializes the runtime library.
|
---|
49 | *
|
---|
50 | * @returns iprt status code.
|
---|
51 | */
|
---|
52 | RTR3DECL(int) RTR3Init(void);
|
---|
53 |
|
---|
54 | /**
|
---|
55 | * Initializes the runtime library and try initialize SUPLib too.
|
---|
56 | *
|
---|
57 | * @returns IPRT status code.
|
---|
58 | * @param pszProgramPath The path to the program file.
|
---|
59 | *
|
---|
60 | * @remarks Failure to initialize SUPLib is ignored.
|
---|
61 | */
|
---|
62 | RTR3DECL(int) RTR3InitAndSUPLib(void);
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * Initializes the runtime library passing it the program path.
|
---|
66 | *
|
---|
67 | * @returns IPRT status code.
|
---|
68 | * @param pszProgramPath The path to the program file.
|
---|
69 | */
|
---|
70 | RTR3DECL(int) RTR3InitWithProgramPath(const char *pszProgramPath);
|
---|
71 |
|
---|
72 | /**
|
---|
73 | * Initializes the runtime library passing it the program path,
|
---|
74 | * and try initialize SUPLib too (failures ignored).
|
---|
75 | *
|
---|
76 | * @returns IPRT status code.
|
---|
77 | * @param pszProgramPath The path to the program file.
|
---|
78 | *
|
---|
79 | * @remarks Failure to initialize SUPLib is ignored.
|
---|
80 | */
|
---|
81 | RTR3DECL(int) RTR3InitAndSUPLibWithProgramPath(const char *pszProgramPath);
|
---|
82 |
|
---|
83 | /**
|
---|
84 | * Terminates the runtime library.
|
---|
85 | */
|
---|
86 | RTR3DECL(void) RTR3Term(void);
|
---|
87 |
|
---|
88 | #endif /* IN_RING3 */
|
---|
89 |
|
---|
90 |
|
---|
91 | #ifdef IN_RING0
|
---|
92 | /**
|
---|
93 | * Initalizes the ring-0 driver runtime library.
|
---|
94 | *
|
---|
95 | * @returns iprt status code.
|
---|
96 | * @param fReserved Flags reserved for the future.
|
---|
97 | */
|
---|
98 | RTR0DECL(int) RTR0Init(unsigned fReserved);
|
---|
99 |
|
---|
100 | /**
|
---|
101 | * Terminates the ring-0 driver runtime library.
|
---|
102 | */
|
---|
103 | RTR0DECL(void) RTR0Term(void);
|
---|
104 | #endif
|
---|
105 |
|
---|
106 | #ifdef IN_GC
|
---|
107 | /**
|
---|
108 | * Initalizes the guest context runtime library.
|
---|
109 | *
|
---|
110 | * @returns iprt status code.
|
---|
111 | *
|
---|
112 | * @param u64ProgramStartNanoTS The startup timestamp.
|
---|
113 | */
|
---|
114 | RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS);
|
---|
115 |
|
---|
116 | /**
|
---|
117 | * Terminates the guest context runtime library.
|
---|
118 | */
|
---|
119 | RTGCDECL(void) RTGCTerm(void);
|
---|
120 | #endif
|
---|
121 |
|
---|
122 |
|
---|
123 | /** @} */
|
---|
124 |
|
---|
125 | /** @} */
|
---|
126 |
|
---|
127 | __END_DECLS
|
---|
128 |
|
---|
129 |
|
---|
130 | #endif
|
---|
131 |
|
---|