]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/x86GetInterruptState.c
Removed CommonHeader.h generated file from the MdePkg.
[mirror_edk2.git] / MdePkg / Library / BaseLib / x86GetInterruptState.c
CommitLineData
e1f414b6 1/** @file\r
2 IA-32/x64 GetInterruptState()\r
3\r
4 Copyright (c) 2006, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: x86GetInterruptState.c\r
14\r
15**/\r
16\r
17//\r
18// Include common header file for this module.\r
19//\r
f734a10a
A
20#include <BaseLibInternals.h>\r
21\r
e1f414b6 22\r
23/**\r
24 Retrieves the current CPU interrupt state.\r
25\r
26 Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r
27 currently enabled. Otherwise returns FALSE.\r
28\r
29 @retval TRUE CPU interrupts are enabled.\r
30 @retval FALSE CPU interrupts are disabled.\r
31\r
32**/\r
33BOOLEAN\r
34EFIAPI\r
35GetInterruptState (\r
36 VOID\r
37 )\r
38{\r
39 IA32_EFLAGS32 EFlags;\r
40\r
41 EFlags.UintN = AsmReadEflags ();\r
42 return (BOOLEAN)(EFlags.Bits.IF == 1);\r
43}\r
44\r
45\r