]>
Commit | Line | Data |
---|---|---|
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 | |
e1f414b6 | 13 | **/\r |
14 | \r | |
15 | //\r | |
16 | // Include common header file for this module.\r | |
17 | //\r | |
f734a10a A |
18 | #include <BaseLibInternals.h>\r |
19 | \r | |
e1f414b6 | 20 | \r |
21 | /**\r | |
22 | Retrieves the current CPU interrupt state.\r | |
23 | \r | |
24 | Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r | |
25 | currently enabled. Otherwise returns FALSE.\r | |
26 | \r | |
27 | @retval TRUE CPU interrupts are enabled.\r | |
28 | @retval FALSE CPU interrupts are disabled.\r | |
29 | \r | |
30 | **/\r | |
31 | BOOLEAN\r | |
32 | EFIAPI\r | |
33 | GetInterruptState (\r | |
34 | VOID\r | |
35 | )\r | |
36 | {\r | |
37 | IA32_EFLAGS32 EFlags;\r | |
38 | \r | |
39 | EFlags.UintN = AsmReadEflags ();\r | |
38bbd3d9 | 40 | return (BOOLEAN)(1 == EFlags.Bits.IF);\r |
e1f414b6 | 41 | }\r |
42 | \r | |
43 | \r |