VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/GVMMR3.cpp@ 92676

Last change on this file since 92676 was 92233, checked in by vboxsync, 3 years ago

VMM/GVMM: Fixes to the worker thread registration. Added missing GVMMR3.cpp file. [doxygen] bugref:10093 bugref:6695

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/* $Id: GVMMR3.cpp 92233 2021-11-05 00:58:21Z vboxsync $ */
2/** @file
3 * GVMM - Global VM Manager, ring-3 request wrappers.
4 */
5
6/*
7 * Copyright (C) 2021 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/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP LOG_GROUP_GVMM
23#include <VBox/vmm/gvmm.h>
24#include <VBox/vmm/vmm.h>
25#include <VBox/vmm/vmcc.h>
26#include <VBox/sup.h>
27
28
29/**
30 * @see GVMMR0RegisterWorkerThread
31 */
32VMMR3_INT_DECL(int) GVMMR3RegisterWorkerThread(PVM pVM, GVMMWORKERTHREAD enmWorker)
33{
34 GVMMREGISTERWORKERTHREADREQ Req;
35 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
36 Req.Hdr.cbReq = sizeof(Req);
37 Req.hNativeThreadR3 = RTThreadNativeSelf();
38 return SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), NIL_VMCPUID,
39 VMMR0_DO_GVMM_REGISTER_WORKER_THREAD, (unsigned)enmWorker, &Req.Hdr);
40}
41
42
43/**
44 * @see GVMMR0DeregisterWorkerThread
45 */
46VMMR3_INT_DECL(int) GVMMR3DeregisterWorkerThread(PVM pVM, GVMMWORKERTHREAD enmWorker)
47{
48 return SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), NIL_VMCPUID,
49 VMMR0_DO_GVMM_DEREGISTER_WORKER_THREAD, (unsigned)enmWorker, NULL);
50}
51
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette