VirtualBox

source: vbox/trunk/src/VBox/VMM/include/EMInline.h@ 105351

Last change on this file since 105351 was 99924, checked in by vboxsync, 19 months ago

VMM/EM: scm fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/* $Id: EMInline.h 99924 2023-05-22 21:07:15Z vboxsync $ */
2/** @file
3 * EM - Internal header file, inline functions.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
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 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef VMM_INCLUDED_SRC_include_EMInline_h
29#define VMM_INCLUDED_SRC_include_EMInline_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34
35/** @addtogroup grp_em_int Internal
36 * @internal
37 * @{
38 */
39
40
41/**
42 * Check if the preset execution time cap restricts guest execution scheduling.
43 *
44 * @returns true if allowed, false otherwise
45 * @param pVM The cross context VM structure.
46 * @param pVCpu The cross context virtual CPU structure.
47 */
48DECLINLINE(bool) emR3IsExecutionAllowed(PVM pVM, PVMCPU pVCpu)
49{
50 return RT_LIKELY(pVM->uCpuExecutionCap == 100) /* no cap, likely */
51 || emR3IsExecutionAllowedSlow(pVM, pVCpu);
52}
53
54
55/** @} */
56
57#endif /* !VMM_INCLUDED_SRC_include_EMInline_h */
58
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