VirtualBox

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

最後變更 在這個檔案從92231是 92231,由 vboxsync 提交於 3 年 前

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.0 KB
 
1/* $Id: GVMMR3.cpp 92231 2021-11-05 00:55:27Z 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.alldomusa.eu.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#include <VBox/param.h>
28
29#include <iprt/assert.h>
30#include <iprt/errcore.h>
31#include <VBox/log.h>
32#include <iprt/mem.h>
33#include <iprt/string.h>
34
35
36/**
37 * @see GMMR0RegisterWorkerThread
38 */
39VMMR3_INT_DECL(int) GVMMR3RegisterWorkerThread(PVM pVM, GVMMWORKERTHREAD enmWorker)
40{
41 GVMMREGISTERWORKERTHREADREQ Req;
42 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
43 Req.Hdr.cbReq = sizeof(Req);
44 Req.hNativeThreadR3 = RTThreadNativeSelf();
45 return SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), NIL_VMCPUID,
46 VMMR0_DO_GVMM_REGISTER_WORKER_THREAD, (unsigned)enmWorker, &Req.Hdr);
47}
48
49
50/**
51 * @see GMMR0DeregisterWorkerThread
52 */
53VMMR3_INT_DECL(int) GVMMR3DeregisterWorkerThread(PVM pVM, GVMMWORKERTHREAD enmWorker)
54{
55 return SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), NIL_VMCPUID,
56 VMMR0_DO_GVMM_DEREGISTER_WORKER_THREAD, (unsigned)enmWorker, NULL);
57}
58
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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