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