2007-06-22 05:21:45 +02:00
|
|
|
/** @file
|
|
|
|
IA-32/x64 GetInterruptState()
|
|
|
|
|
2010-04-23 18:00:47 +02:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
2019-04-04 01:06:00 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2007-06-22 05:21:45 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
2008-10-31 05:32:02 +01:00
|
|
|
#include "BaseLibInternals.h"
|
2007-06-30 01:22:13 +02:00
|
|
|
|
2007-06-22 05:21:45 +02:00
|
|
|
/**
|
|
|
|
Retrieves the current CPU interrupt state.
|
|
|
|
|
2008-11-25 04:19:49 +01:00
|
|
|
Returns TRUE is interrupts are currently enabled. Otherwise
|
|
|
|
returns FALSE.
|
2007-06-22 05:21:45 +02:00
|
|
|
|
|
|
|
@retval TRUE CPU interrupts are enabled.
|
|
|
|
@retval FALSE CPU interrupts are disabled.
|
|
|
|
|
|
|
|
**/
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
GetInterruptState (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
2021-12-05 23:54:05 +01:00
|
|
|
IA32_EFLAGS32 EFlags;
|
2007-06-22 05:21:45 +02:00
|
|
|
|
|
|
|
EFlags.UintN = AsmReadEflags ();
|
2008-07-08 11:38:43 +02:00
|
|
|
return (BOOLEAN)(1 == EFlags.Bits.IF);
|
2007-06-22 05:21:45 +02:00
|
|
|
}
|