]>
Commit | Line | Data |
---|---|---|
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 | |
21 | BOOLEAN\r | |
22 | EFIAPI\r | |
23 | GetInterruptState (\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 |