]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/x86GetInterruptState.c
Update the Guid Value of Ext SCSI Pass Thru Protocol
[mirror_edk2.git] / MdePkg / Library / BaseLib / x86GetInterruptState.c
CommitLineData
3f566587 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 Retrieves the current CPU interrupt state.\r
19\r
20 Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r
21 currently enabled. Otherwise returns FALSE.\r
22\r
23 @retval TRUE CPU interrupts are enabled.\r
24 @retval FALSE CPU interrupts are disabled.\r
25\r
26**/\r
27BOOLEAN\r
28EFIAPI\r
29GetInterruptState (\r
30 VOID\r
31 )\r
32{\r
33 IA32_EFLAGS32 EFlags;\r
34\r
35 EFlags.UintN = AsmReadEflags ();\r
36 return (BOOLEAN)(EFlags.Bits.IF == 1);\r
37}\r
38\r
39\r