VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseLib/X86GetInterruptState.c@ 99396

Last change on this file since 99396 was 80721, checked in by vboxsync, 6 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 599 bytes
Line 
1/** @file
2 IA-32/x64 GetInterruptState()
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9
10#include "BaseLibInternals.h"
11
12
13/**
14 Retrieves the current CPU interrupt state.
15
16 Returns TRUE is interrupts are currently enabled. Otherwise
17 returns FALSE.
18
19 @retval TRUE CPU interrupts are enabled.
20 @retval FALSE CPU interrupts are disabled.
21
22**/
23BOOLEAN
24EFIAPI
25GetInterruptState (
26 VOID
27 )
28{
29 IA32_EFLAGS32 EFlags;
30
31 EFlags.UintN = AsmReadEflags ();
32 return (BOOLEAN)(1 == EFlags.Bits.IF);
33}
34
35
Note: See TracBrowser for help on using the repository browser.

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