]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | \r | |
13 | Module Name:\r | |
14 | \r | |
15 | x86GetInterruptState.c\r | |
16 | \r | |
17 | Abstract: \r | |
18 | \r | |
19 | IA-32/x64 specific functions.\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #include "BaseLibInternal.h"\r | |
24 | \r | |
25 | /**\r | |
26 | Retrieves the current CPU interrupt state.\r | |
27 | \r | |
28 | Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r | |
29 | currently enabled. Otherwise returns FALSE.\r | |
30 | \r | |
31 | @retval TRUE CPU interrupts are enabled.\r | |
32 | @retval FALSE CPU interrupts are disabled.\r | |
33 | \r | |
34 | **/\r | |
35 | BOOLEAN\r | |
36 | EFIAPI\r | |
37 | GlueGetInterruptState (\r | |
38 | VOID\r | |
39 | )\r | |
40 | {\r | |
41 | IA32_EFLAGS32 EFlags;\r | |
42 | \r | |
43 | EFlags.UintN = AsmReadEflags ();\r | |
44 | return (BOOLEAN)(EFlags.Bits.IF == 1);\r | |
45 | }\r | |
46 | \r | |
47 | \r |