VirtualBox

source: vbox/trunk/src/VBox/VMM/tools/VBoxCpuReport.h@ 90634

Last change on this file since 90634 was 85121, checked in by vboxsync, 4 years ago

iprt/cdefs.h: Refactored the typedef use of DECLCALLBACK as well as DECLCALLBACKMEMBER to wrap the whole expression, similar to the DECLR?CALLBACKMEMBER macros. This allows adding a throw() at the end when compiling with the VC++ compiler to indicate that the callbacks won't throw anything, so we can stop supressing the C5039 warning about passing functions that can potential throw C++ exceptions to extern C code that can't necessarily cope with such (unwind,++). Introduced a few _EX variations that allows specifying different/no calling convention too, as that's handy when dynamically resolving host APIs. Fixed numerous places missing DECLCALLBACK and such. Left two angry @todos regarding use of CreateThread. bugref:9794

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: VBoxCpuReport.h 85121 2020-07-08 19:33:26Z vboxsync $ */
2/** @file
3 * VBoxCpuReport internal header file.
4 */
5
6/*
7 * Copyright (C) 2013-2020 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#ifndef VMM_INCLUDED_SRC_tools_VBoxCpuReport_h
19#define VMM_INCLUDED_SRC_tools_VBoxCpuReport_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/sup.h>
25
26RT_C_DECLS_BEGIN
27
28typedef struct VBCPUREPMSRACCESSORS
29{
30 /** Wheter MSR prober can read/modify/restore MSRs more or less
31 * atomically, without allowing other code to be executed. */
32 bool fAtomic;
33 /** @copydoc SUPR3MsrProberRead */
34 DECLCALLBACKMEMBER(int, pfnMsrProberRead,(uint32_t uMsr, RTCPUID idCpu, uint64_t *puValue, bool *pfGp));
35 /** @copydoc SUPR3MsrProberWrite */
36 DECLCALLBACKMEMBER(int, pfnMsrProberWrite,(uint32_t uMsr, RTCPUID idCpu, uint64_t uValue, bool *pfGp));
37 /** @copydoc SUPR3MsrProberModify */
38 DECLCALLBACKMEMBER(int, pfnMsrProberModify,(uint32_t uMsr, RTCPUID idCpu, uint64_t fAndMask, uint64_t fOrMask,
39 PSUPMSRPROBERMODIFYRESULT pResult));
40 /** Termination callback, optional. */
41 DECLCALLBACKMEMBER(void, pfnTerm,(void));
42} VBCPUREPMSRACCESSORS;
43typedef VBCPUREPMSRACCESSORS *PVBCPUREPMSRACCESSORS;
44
45extern void vbCpuRepDebug(const char *pszMsg, ...);
46extern void vbCpuRepPrintf(const char *pszMsg, ...);
47extern int VbCpuRepMsrProberInitSupDrv(PVBCPUREPMSRACCESSORS pMsrAccessors);
48extern int VbCpuRepMsrProberInitPlatform(PVBCPUREPMSRACCESSORS pMsrAccessors);
49
50RT_C_DECLS_END
51
52#endif /* !VMM_INCLUDED_SRC_tools_VBoxCpuReport_h */
53
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