1 | /* $Id: VBoxGuest-haiku-stubs.c 76553 2019-01-01 01:45:53Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxGuest kernel module, Haiku Guest Additions, stubs.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012-2019 Oracle Corporation
|
---|
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 (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | /*
|
---|
28 | * This code is based on:
|
---|
29 | *
|
---|
30 | * VirtualBox Guest Additions for Haiku.
|
---|
31 | * Copyright (c) 2011 Mike Smith <mike@scgtrp.net>
|
---|
32 | * François Revol <revol@free.fr>
|
---|
33 | *
|
---|
34 | * Permission is hereby granted, free of charge, to any person
|
---|
35 | * obtaining a copy of this software and associated documentation
|
---|
36 | * files (the "Software"), to deal in the Software without
|
---|
37 | * restriction, including without limitation the rights to use,
|
---|
38 | * copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
39 | * copies of the Software, and to permit persons to whom the
|
---|
40 | * Software is furnished to do so, subject to the following
|
---|
41 | * conditions:
|
---|
42 | *
|
---|
43 | * The above copyright notice and this permission notice shall be
|
---|
44 | * included in all copies or substantial portions of the Software.
|
---|
45 | *
|
---|
46 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
47 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
---|
48 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
49 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
---|
50 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
51 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
52 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
53 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
54 | */
|
---|
55 |
|
---|
56 |
|
---|
57 | /*
|
---|
58 | * This file provides stubs for calling VBox runtime functions through the vboxguest module.
|
---|
59 | * It should be linked into any driver or module that uses the VBox runtime, except vboxguest
|
---|
60 | * itself (which contains the actual library and therefore doesn't need stubs to call it).
|
---|
61 | */
|
---|
62 |
|
---|
63 | #include "VBoxGuest-haiku.h"
|
---|
64 | #include "VBoxGuestInternal.h"
|
---|
65 | #include <VBox/log.h>
|
---|
66 | #include <iprt/assert.h>
|
---|
67 | #include <iprt/initterm.h>
|
---|
68 | #include <iprt/process.h>
|
---|
69 | #include <iprt/mem.h>
|
---|
70 | #include <iprt/asm.h>
|
---|
71 | #include <iprt/mp.h>
|
---|
72 | #include <iprt/power.h>
|
---|
73 | #include <iprt/thread.h>
|
---|
74 |
|
---|
75 | // >>> file('/tmp/stubs.c', 'w').writelines([re.sub(r'^(?P<returntype>[^(]+) \(\*_(?P<functionname>[A-Za-z0-9_]+)\)\((?P<params>[^)]+)\);', lambda m: '%s %s(%s)\n{\n %sg_VBoxGuest->_%s(%s);\n}\n' % (m.group(1), m.group(2), m.group(3), ('return ' if m.group(1) != 'void' else ''), m.group(2), (', '.join(a.split(' ')[-1].replace('*', '') for a in m.group(3).split(',')) if m.group(3) != 'void' else '')), f) for f in functions])
|
---|
76 |
|
---|
77 | struct vboxguest_module_info *g_VBoxGuest;
|
---|
78 |
|
---|
79 | RTDECL(size_t) RTLogBackdoorPrintf(const char *pszFormat, ...)
|
---|
80 | {
|
---|
81 | va_list args;
|
---|
82 | size_t cb;
|
---|
83 |
|
---|
84 | va_start(args, pszFormat);
|
---|
85 | cb = g_VBoxGuest->_RTLogBackdoorPrintf(pszFormat, args);
|
---|
86 | va_end(args);
|
---|
87 |
|
---|
88 | return cb;
|
---|
89 | }
|
---|
90 | RTDECL(size_t) RTLogBackdoorPrintfV(const char *pszFormat, va_list args)
|
---|
91 | {
|
---|
92 | return g_VBoxGuest->_RTLogBackdoorPrintfV(pszFormat, args);
|
---|
93 | }
|
---|
94 | RTDECL(int) RTLogSetDefaultInstanceThread(PRTLOGGER pLogger, uintptr_t uKey)
|
---|
95 | {
|
---|
96 | return g_VBoxGuest->_RTLogSetDefaultInstanceThread(pLogger, uKey);
|
---|
97 | }
|
---|
98 | RTDECL(int) RTMemAllocExTag(size_t cb, size_t cbAlignment, uint32_t fFlags, const char *pszTag, void **ppv)
|
---|
99 | {
|
---|
100 | return g_VBoxGuest->_RTMemAllocExTag(cb, cbAlignment, fFlags, pszTag, ppv);
|
---|
101 | }
|
---|
102 | RTR0DECL(void*) RTMemContAlloc(PRTCCPHYS pPhys, size_t cb)
|
---|
103 | {
|
---|
104 | return g_VBoxGuest->_RTMemContAlloc(pPhys, cb);
|
---|
105 | }
|
---|
106 | RTR0DECL(void) RTMemContFree(void *pv, size_t cb)
|
---|
107 | {
|
---|
108 | g_VBoxGuest->_RTMemContFree(pv, cb);
|
---|
109 | }
|
---|
110 | RTDECL(void) RTMemFreeEx(void *pv, size_t cb)
|
---|
111 | {
|
---|
112 | g_VBoxGuest->_RTMemFreeEx(pv, cb);
|
---|
113 | }
|
---|
114 | RTDECL(bool) RTMpIsCpuPossible(RTCPUID idCpu)
|
---|
115 | {
|
---|
116 | return g_VBoxGuest->_RTMpIsCpuPossible(idCpu);
|
---|
117 | }
|
---|
118 | RTDECL(int) RTMpNotificationDeregister(PFNRTMPNOTIFICATION pfnCallback, void *pvUser)
|
---|
119 | {
|
---|
120 | return g_VBoxGuest->_RTMpNotificationDeregister(pfnCallback, pvUser);
|
---|
121 | }
|
---|
122 | RTDECL(int) RTMpNotificationRegister(PFNRTMPNOTIFICATION pfnCallback, void *pvUser)
|
---|
123 | {
|
---|
124 | return g_VBoxGuest->_RTMpNotificationRegister(pfnCallback, pvUser);
|
---|
125 | }
|
---|
126 | RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
|
---|
127 | {
|
---|
128 | return g_VBoxGuest->_RTMpOnAll(pfnWorker, pvUser1, pvUser2);
|
---|
129 | }
|
---|
130 | RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
|
---|
131 | {
|
---|
132 | return g_VBoxGuest->_RTMpOnOthers(pfnWorker, pvUser1, pvUser2);
|
---|
133 | }
|
---|
134 | RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
|
---|
135 | {
|
---|
136 | return g_VBoxGuest->_RTMpOnSpecific(idCpu, pfnWorker, pvUser1, pvUser2);
|
---|
137 | }
|
---|
138 | RTDECL(int) RTPowerNotificationDeregister(PFNRTPOWERNOTIFICATION pfnCallback, void *pvUser)
|
---|
139 | {
|
---|
140 | return g_VBoxGuest->_RTPowerNotificationDeregister(pfnCallback, pvUser);
|
---|
141 | }
|
---|
142 | RTDECL(int) RTPowerNotificationRegister(PFNRTPOWERNOTIFICATION pfnCallback, void *pvUser)
|
---|
143 | {
|
---|
144 | return g_VBoxGuest->_RTPowerNotificationRegister(pfnCallback, pvUser);
|
---|
145 | }
|
---|
146 | RTDECL(int) RTPowerSignalEvent(RTPOWEREVENT enmEvent)
|
---|
147 | {
|
---|
148 | return g_VBoxGuest->_RTPowerSignalEvent(enmEvent);
|
---|
149 | }
|
---|
150 | RTR0DECL(void) RTR0AssertPanicSystem(void)
|
---|
151 | {
|
---|
152 | g_VBoxGuest->_RTR0AssertPanicSystem();
|
---|
153 | }
|
---|
154 | RTR0DECL(int) RTR0Init(unsigned fReserved)
|
---|
155 | {
|
---|
156 | return g_VBoxGuest->_RTR0Init(fReserved);
|
---|
157 | }
|
---|
158 | RTR0DECL(void*) RTR0MemObjAddress(RTR0MEMOBJ MemObj)
|
---|
159 | {
|
---|
160 | return g_VBoxGuest->_RTR0MemObjAddress(MemObj);
|
---|
161 | }
|
---|
162 | RTR0DECL(RTR3PTR) RTR0MemObjAddressR3(RTR0MEMOBJ MemObj)
|
---|
163 | {
|
---|
164 | return g_VBoxGuest->_RTR0MemObjAddressR3(MemObj);
|
---|
165 | }
|
---|
166 | RTR0DECL(int) RTR0MemObjAllocContTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecutable, const char *pszTag)
|
---|
167 | {
|
---|
168 | return g_VBoxGuest->_RTR0MemObjAllocContTag(pMemObj, cb, fExecutable, pszTag);
|
---|
169 | }
|
---|
170 | RTR0DECL(int) RTR0MemObjAllocLowTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecutable, const char *pszTag)
|
---|
171 | {
|
---|
172 | return g_VBoxGuest->_RTR0MemObjAllocLowTag(pMemObj, cb, fExecutable, pszTag);
|
---|
173 | }
|
---|
174 | RTR0DECL(int) RTR0MemObjAllocPageTag(PRTR0MEMOBJ pMemObj, size_t cb, bool fExecutable, const char *pszTag)
|
---|
175 | {
|
---|
176 | return g_VBoxGuest->_RTR0MemObjAllocPageTag(pMemObj, cb, fExecutable, pszTag);
|
---|
177 | }
|
---|
178 | RTR0DECL(int) RTR0MemObjAllocPhysExTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment, const char *pszTag)
|
---|
179 | {
|
---|
180 | return g_VBoxGuest->_RTR0MemObjAllocPhysExTag(pMemObj, cb, PhysHighest, uAlignment, pszTag);
|
---|
181 | }
|
---|
182 | RTR0DECL(int) RTR0MemObjAllocPhysNCTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest, const char *pszTag)
|
---|
183 | {
|
---|
184 | return g_VBoxGuest->_RTR0MemObjAllocPhysNCTag(pMemObj, cb, PhysHighest, pszTag);
|
---|
185 | }
|
---|
186 | RTR0DECL(int) RTR0MemObjAllocPhysTag(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest, const char *pszTag)
|
---|
187 | {
|
---|
188 | return g_VBoxGuest->_RTR0MemObjAllocPhysTag(pMemObj, cb, PhysHighest, pszTag);
|
---|
189 | }
|
---|
190 | RTR0DECL(int) RTR0MemObjEnterPhysTag(PRTR0MEMOBJ pMemObj, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy, const char *pszTag)
|
---|
191 | {
|
---|
192 | return g_VBoxGuest->_RTR0MemObjEnterPhysTag(pMemObj, Phys, cb, uCachePolicy, pszTag);
|
---|
193 | }
|
---|
194 | RTR0DECL(int) RTR0MemObjFree(RTR0MEMOBJ MemObj, bool fFreeMappings)
|
---|
195 | {
|
---|
196 | return g_VBoxGuest->_RTR0MemObjFree(MemObj, fFreeMappings);
|
---|
197 | }
|
---|
198 | RTR0DECL(RTHCPHYS) RTR0MemObjGetPagePhysAddr(RTR0MEMOBJ MemObj, size_t iPage)
|
---|
199 | {
|
---|
200 | return g_VBoxGuest->_RTR0MemObjGetPagePhysAddr(MemObj, iPage);
|
---|
201 | }
|
---|
202 | RTR0DECL(bool) RTR0MemObjIsMapping(RTR0MEMOBJ MemObj)
|
---|
203 | {
|
---|
204 | return g_VBoxGuest->_RTR0MemObjIsMapping(MemObj);
|
---|
205 | }
|
---|
206 | RTR0DECL(int) RTR0MemObjLockKernelTag(PRTR0MEMOBJ pMemObj, void *pv, size_t cb, uint32_t fAccess, const char *pszTag)
|
---|
207 | {
|
---|
208 | return g_VBoxGuest->_RTR0MemObjLockKernelTag(pMemObj, pv, cb, fAccess, pszTag);
|
---|
209 | }
|
---|
210 | RTR0DECL(int) RTR0MemObjLockUserTag(PRTR0MEMOBJ pMemObj, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process, const char *pszTag)
|
---|
211 | {
|
---|
212 | return g_VBoxGuest->_RTR0MemObjLockUserTag(pMemObj, R3Ptr, cb, fAccess, R0Process, pszTag);
|
---|
213 | }
|
---|
214 | RTR0DECL(int) RTR0MemObjMapKernelExTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, void *pvFixed, size_t uAlignment, unsigned fProt, size_t offSub, size_t cbSub, const char *pszTag)
|
---|
215 | {
|
---|
216 | return g_VBoxGuest->_RTR0MemObjMapKernelExTag(pMemObj, MemObjToMap, pvFixed, uAlignment, fProt, offSub, cbSub, pszTag);
|
---|
217 | }
|
---|
218 | RTR0DECL(int) RTR0MemObjMapKernelTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, void *pvFixed, size_t uAlignment, unsigned fProt, const char *pszTag)
|
---|
219 | {
|
---|
220 | return g_VBoxGuest->_RTR0MemObjMapKernelTag(pMemObj, MemObjToMap, pvFixed, uAlignment, fProt, pszTag);
|
---|
221 | }
|
---|
222 | RTR0DECL(int) RTR0MemObjMapUserTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process, const char *pszTag)
|
---|
223 | {
|
---|
224 | return g_VBoxGuest->_RTR0MemObjMapUserTag(pMemObj, MemObjToMap, R3PtrFixed, uAlignment, fProt, R0Process, pszTag);
|
---|
225 | }
|
---|
226 | RTR0DECL(int) RTR0MemObjProtect(RTR0MEMOBJ hMemObj, size_t offSub, size_t cbSub, uint32_t fProt)
|
---|
227 | {
|
---|
228 | return g_VBoxGuest->_RTR0MemObjProtect(hMemObj, offSub, cbSub, fProt);
|
---|
229 | }
|
---|
230 | RTR0DECL(int) RTR0MemObjReserveKernelTag(PRTR0MEMOBJ pMemObj, void *pvFixed, size_t cb, size_t uAlignment, const char *pszTag)
|
---|
231 | {
|
---|
232 | return g_VBoxGuest->_RTR0MemObjReserveKernelTag(pMemObj, pvFixed, cb, uAlignment, pszTag);
|
---|
233 | }
|
---|
234 | RTR0DECL(int) RTR0MemObjReserveUserTag(PRTR0MEMOBJ pMemObj, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process, const char *pszTag)
|
---|
235 | {
|
---|
236 | return g_VBoxGuest->_RTR0MemObjReserveUserTag(pMemObj, R3PtrFixed, cb, uAlignment, R0Process, pszTag);
|
---|
237 | }
|
---|
238 | RTR0DECL(size_t) RTR0MemObjSize(RTR0MEMOBJ MemObj)
|
---|
239 | {
|
---|
240 | return g_VBoxGuest->_RTR0MemObjSize(MemObj);
|
---|
241 | }
|
---|
242 | RTR0DECL(RTR0PROCESS) RTR0ProcHandleSelf(void)
|
---|
243 | {
|
---|
244 | return g_VBoxGuest->_RTR0ProcHandleSelf();
|
---|
245 | }
|
---|
246 | RTR0DECL(void) RTR0Term(void)
|
---|
247 | {
|
---|
248 | g_VBoxGuest->_RTR0Term();
|
---|
249 | }
|
---|
250 | RTR0DECL(void) RTR0TermForced(void)
|
---|
251 | {
|
---|
252 | g_VBoxGuest->_RTR0TermForced();
|
---|
253 | }
|
---|
254 | RTDECL(RTPROCESS) RTProcSelf(void)
|
---|
255 | {
|
---|
256 | return g_VBoxGuest->_RTProcSelf();
|
---|
257 | }
|
---|
258 | RTDECL(uint32_t) RTSemEventGetResolution(void)
|
---|
259 | {
|
---|
260 | return g_VBoxGuest->_RTSemEventGetResolution();
|
---|
261 | }
|
---|
262 | RTDECL(uint32_t) RTSemEventMultiGetResolution(void)
|
---|
263 | {
|
---|
264 | return g_VBoxGuest->_RTSemEventMultiGetResolution();
|
---|
265 | }
|
---|
266 | RTDECL(int) RTSemEventMultiWaitEx(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout)
|
---|
267 | {
|
---|
268 | return g_VBoxGuest->_RTSemEventMultiWaitEx(hEventMultiSem, fFlags, uTimeout);
|
---|
269 | }
|
---|
270 | RTDECL(int) RTSemEventMultiWaitExDebug(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
271 | {
|
---|
272 | return g_VBoxGuest->_RTSemEventMultiWaitExDebug(hEventMultiSem, fFlags, uTimeout, uId, pszFile, iLine, pszFunction);
|
---|
273 | }
|
---|
274 | RTDECL(int) RTSemEventWaitEx(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout)
|
---|
275 | {
|
---|
276 | return g_VBoxGuest->_RTSemEventWaitEx(hEventSem, fFlags, uTimeout);
|
---|
277 | }
|
---|
278 | RTDECL(int) RTSemEventWaitExDebug(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
279 | {
|
---|
280 | return g_VBoxGuest->_RTSemEventWaitExDebug(hEventSem, fFlags, uTimeout, uId, pszFile, iLine, pszFunction);
|
---|
281 | }
|
---|
282 | RTDECL(bool) RTThreadIsInInterrupt(RTTHREAD hThread)
|
---|
283 | {
|
---|
284 | return g_VBoxGuest->_RTThreadIsInInterrupt(hThread);
|
---|
285 | }
|
---|
286 | RTDECL(void) RTThreadPreemptDisable(PRTTHREADPREEMPTSTATE pState)
|
---|
287 | {
|
---|
288 | g_VBoxGuest->_RTThreadPreemptDisable(pState);
|
---|
289 | }
|
---|
290 | RTDECL(bool) RTThreadPreemptIsEnabled(RTTHREAD hThread)
|
---|
291 | {
|
---|
292 | return g_VBoxGuest->_RTThreadPreemptIsEnabled(hThread);
|
---|
293 | }
|
---|
294 | RTDECL(bool) RTThreadPreemptIsPending(RTTHREAD hThread)
|
---|
295 | {
|
---|
296 | return g_VBoxGuest->_RTThreadPreemptIsPending(hThread);
|
---|
297 | }
|
---|
298 | RTDECL(bool) RTThreadPreemptIsPendingTrusty(void)
|
---|
299 | {
|
---|
300 | return g_VBoxGuest->_RTThreadPreemptIsPendingTrusty();
|
---|
301 | }
|
---|
302 | RTDECL(bool) RTThreadPreemptIsPossible(void)
|
---|
303 | {
|
---|
304 | return g_VBoxGuest->_RTThreadPreemptIsPossible();
|
---|
305 | }
|
---|
306 | RTDECL(void) RTThreadPreemptRestore(PRTTHREADPREEMPTSTATE pState)
|
---|
307 | {
|
---|
308 | g_VBoxGuest->_RTThreadPreemptRestore(pState);
|
---|
309 | }
|
---|
310 | RTDECL(uint32_t) RTTimerGetSystemGranularity(void)
|
---|
311 | {
|
---|
312 | return g_VBoxGuest->_RTTimerGetSystemGranularity();
|
---|
313 | }
|
---|
314 | RTDECL(int) RTTimerReleaseSystemGranularity(uint32_t u32Granted)
|
---|
315 | {
|
---|
316 | return g_VBoxGuest->_RTTimerReleaseSystemGranularity(u32Granted);
|
---|
317 | }
|
---|
318 | RTDECL(int) RTTimerRequestSystemGranularity(uint32_t u32Request, uint32_t *pu32Granted)
|
---|
319 | {
|
---|
320 | return g_VBoxGuest->_RTTimerRequestSystemGranularity(u32Request, pu32Granted);
|
---|
321 | }
|
---|
322 | RTDECL(void) RTSpinlockAcquire(RTSPINLOCK Spinlock)
|
---|
323 | {
|
---|
324 | g_VBoxGuest->_RTSpinlockAcquire(Spinlock);
|
---|
325 | }
|
---|
326 | RTDECL(void) RTSpinlockRelease(RTSPINLOCK Spinlock)
|
---|
327 | {
|
---|
328 | g_VBoxGuest->_RTSpinlockRelease(Spinlock);
|
---|
329 | }
|
---|
330 | RTDECL(void*) RTMemTmpAllocTag(size_t cb, const char *pszTag)
|
---|
331 | {
|
---|
332 | return g_VBoxGuest->_RTMemTmpAllocTag(cb, pszTag);
|
---|
333 | }
|
---|
334 | RTDECL(void) RTMemTmpFree(void *pv)
|
---|
335 | {
|
---|
336 | g_VBoxGuest->_RTMemTmpFree(pv);
|
---|
337 | }
|
---|
338 | RTDECL(PRTLOGGER) RTLogDefaultInstance(void)
|
---|
339 | {
|
---|
340 | return g_VBoxGuest->_RTLogDefaultInstance();
|
---|
341 | }
|
---|
342 | RTDECL(PRTLOGGER) RTLogDefaultInstanceEx(uint32_t fFlagsAndGroup)
|
---|
343 | {
|
---|
344 | return g_VBoxGuest->_RTLogDefaultInstanceEx(fFlagsAndGroup);
|
---|
345 | }
|
---|
346 | RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(void)
|
---|
347 | {
|
---|
348 | return g_VBoxGuest->_RTLogRelGetDefaultInstance();
|
---|
349 | }
|
---|
350 | RTDECL(PRTLOGGER) RTLogRelGetDefaultInstance(uint32_t fFlags, uint32_t iGroup)
|
---|
351 | {
|
---|
352 | return g_VBoxGuest->_RTLogRelGetDefaultInstanceEx(fFlags, iGroup);
|
---|
353 | }
|
---|
354 | RTDECL(int) RTErrConvertToErrno(int iErr)
|
---|
355 | {
|
---|
356 | return g_VBoxGuest->_RTErrConvertToErrno(iErr);
|
---|
357 | }
|
---|
358 | int VGDrvCommonIoCtl(unsigned iFunction, PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, void *pvData, size_t cbData, size_t *pcbDataReturned)
|
---|
359 | {
|
---|
360 | return g_VBoxGuest->_VGDrvCommonIoCtl(iFunction, pDevExt, pSession, pvData, cbData, pcbDataReturned);
|
---|
361 | }
|
---|
362 | int VGDrvCommonCreateUserSession(PVBOXGUESTDEVEXT pDevExt, uint32_t fRequestor, PVBOXGUESTSESSION *ppSession)
|
---|
363 | {
|
---|
364 | return g_VBoxGuest->_VGDrvCommonCreateUserSession(pDevExt, fRequestor, ppSession);
|
---|
365 | }
|
---|
366 | void VGDrvCommonCloseSession(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)
|
---|
367 | {
|
---|
368 | g_VBoxGuest->_VGDrvCommonCloseSession(pDevExt, pSession);
|
---|
369 | }
|
---|
370 | void* VBoxGuestIDCOpen(uint32_t *pu32Version)
|
---|
371 | {
|
---|
372 | return g_VBoxGuest->_VBoxGuestIDCOpen(pu32Version);
|
---|
373 | }
|
---|
374 | int VBoxGuestIDCClose(void *pvSession)
|
---|
375 | {
|
---|
376 | return g_VBoxGuest->_VBoxGuestIDCClose(pvSession);
|
---|
377 | }
|
---|
378 | int VBoxGuestIDCCall(void *pvSession, unsigned iCmd, void *pvData, size_t cbData, size_t *pcbDataReturned)
|
---|
379 | {
|
---|
380 | return g_VBoxGuest->_VBoxGuestIDCCall(pvSession, iCmd, pvData, cbData, pcbDataReturned);
|
---|
381 | }
|
---|
382 | RTDECL(void) RTAssertMsg1Weak(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
|
---|
383 | {
|
---|
384 | g_VBoxGuest->_RTAssertMsg1Weak(pszExpr, uLine, pszFile, pszFunction);
|
---|
385 | }
|
---|
386 | RTDECL(void) RTAssertMsg2Weak(const char *pszFormat, ...)
|
---|
387 | {
|
---|
388 | va_list va;
|
---|
389 | va_start(va, pszFormat);
|
---|
390 | RTAssertMsg2WeakV(pszFormat, va);
|
---|
391 | va_end(va);
|
---|
392 | }
|
---|
393 | RTDECL(void) RTAssertMsg2WeakV(const char *pszFormat, va_list va)
|
---|
394 | {
|
---|
395 | g_VBoxGuest->_RTAssertMsg2WeakV(pszFormat, va);
|
---|
396 | }
|
---|
397 | RTDECL(bool) RTAssertShouldPanic(void)
|
---|
398 | {
|
---|
399 | return g_VBoxGuest->_RTAssertShouldPanic();
|
---|
400 | }
|
---|
401 | RTDECL(int) RTSemFastMutexCreate(PRTSEMFASTMUTEX phFastMtx)
|
---|
402 | {
|
---|
403 | return g_VBoxGuest->_RTSemFastMutexCreate(phFastMtx);
|
---|
404 | }
|
---|
405 | RTDECL(int) RTSemFastMutexDestroy(RTSEMFASTMUTEX hFastMtx)
|
---|
406 | {
|
---|
407 | return g_VBoxGuest->_RTSemFastMutexDestroy(hFastMtx);
|
---|
408 | }
|
---|
409 | RTDECL(int) RTSemFastMutexRelease(RTSEMFASTMUTEX hFastMtx)
|
---|
410 | {
|
---|
411 | return g_VBoxGuest->_RTSemFastMutexRelease(hFastMtx);
|
---|
412 | }
|
---|
413 | RTDECL(int) RTSemFastMutexRequest(RTSEMFASTMUTEX hFastMtx)
|
---|
414 | {
|
---|
415 | return g_VBoxGuest->_RTSemFastMutexRequest(hFastMtx);
|
---|
416 | }
|
---|
417 | RTDECL(int) RTSemMutexCreate(PRTSEMMUTEX phFastMtx)
|
---|
418 | {
|
---|
419 | return g_VBoxGuest->_RTSemMutexCreate(phFastMtx);
|
---|
420 | }
|
---|
421 | RTDECL(int) RTSemMutexDestroy(RTSEMMUTEX hFastMtx)
|
---|
422 | {
|
---|
423 | return g_VBoxGuest->_RTSemMutexDestroy(hFastMtx);
|
---|
424 | }
|
---|
425 | RTDECL(int) RTSemMutexRelease(RTSEMMUTEX hFastMtx)
|
---|
426 | {
|
---|
427 | return g_VBoxGuest->_RTSemMutexRelease(hFastMtx);
|
---|
428 | }
|
---|
429 | RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hFastMtx, RTMSINTERVAL cMillies)
|
---|
430 | {
|
---|
431 | return g_VBoxGuest->_RTSemMutexRequest(hFastMtx, cMillies);
|
---|
432 | }
|
---|
433 | int RTHeapSimpleRelocate(RTHEAPSIMPLE hHeap, uintptr_t offDelta)
|
---|
434 | {
|
---|
435 | return g_VBoxGuest->_RTHeapSimpleRelocate(hHeap, offDelta);
|
---|
436 | }
|
---|
437 | int RTHeapOffsetInit(PRTHEAPOFFSET phHeap, void *pvMemory, size_t cbMemory)
|
---|
438 | {
|
---|
439 | return g_VBoxGuest->_RTHeapOffsetInit(phHeap, pvMemory, cbMemory);
|
---|
440 | }
|
---|
441 | int RTHeapSimpleInit(PRTHEAPSIMPLE pHeap, void *pvMemory, size_t cbMemory)
|
---|
442 | {
|
---|
443 | return g_VBoxGuest->_RTHeapSimpleInit(pHeap, pvMemory, cbMemory);
|
---|
444 | }
|
---|
445 | void* RTHeapOffsetAlloc(RTHEAPOFFSET hHeap, size_t cb, size_t cbAlignment)
|
---|
446 | {
|
---|
447 | return g_VBoxGuest->_RTHeapOffsetAlloc(hHeap, cb, cbAlignment);
|
---|
448 | }
|
---|
449 | void* RTHeapSimpleAlloc(RTHEAPSIMPLE Heap, size_t cb, size_t cbAlignment)
|
---|
450 | {
|
---|
451 | return g_VBoxGuest->_RTHeapSimpleAlloc(Heap, cb, cbAlignment);
|
---|
452 | }
|
---|
453 | void RTHeapOffsetFree(RTHEAPOFFSET hHeap, void *pv)
|
---|
454 | {
|
---|
455 | g_VBoxGuest->_RTHeapOffsetFree(hHeap, pv);
|
---|
456 | }
|
---|
457 | void RTHeapSimpleFree(RTHEAPSIMPLE Heap, void *pv)
|
---|
458 | {
|
---|
459 | g_VBoxGuest->_RTHeapSimpleFree(Heap, pv);
|
---|
460 | }
|
---|
461 |
|
---|