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