]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseLib/X86GetInterruptState.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / X86GetInterruptState.c
... / ...
CommitLineData
1/** @file\r
2 IA-32/x64 GetInterruptState()\r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include "BaseLibInternals.h"\r
10\r
11/**\r
12 Retrieves the current CPU interrupt state.\r
13\r
14 Returns TRUE is interrupts are currently enabled. Otherwise\r
15 returns FALSE.\r
16\r
17 @retval TRUE CPU interrupts are enabled.\r
18 @retval FALSE CPU interrupts are disabled.\r
19\r
20**/\r
21BOOLEAN\r
22EFIAPI\r
23GetInterruptState (\r
24 VOID\r
25 )\r
26{\r
27 IA32_EFLAGS32 EFlags;\r
28\r
29 EFlags.UintN = AsmReadEflags ();\r
30 return (BOOLEAN)(1 == EFlags.Bits.IF);\r
31}\r