]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseLib / RiscV64 / GetInterruptState.c
1 /** @file
2 CPU get interrupt state function for RISC-V
3
4 Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7 **/
8
9 #include "BaseLibInternals.h"
10
11 extern UINT32
12 RiscVGetSupervisorModeInterrupts (
13 VOID
14 );
15
16 /**
17 Retrieves the current CPU interrupt state.
18
19 Returns TRUE is interrupts are currently enabled. Otherwise
20 returns FALSE.
21
22 @retval TRUE CPU interrupts are enabled.
23 @retval FALSE CPU interrupts are disabled.
24
25 **/
26 BOOLEAN
27 EFIAPI
28 GetInterruptState (
29 VOID
30 )
31 {
32 unsigned long RetValue;
33
34 RetValue = RiscVGetSupervisorModeInterrupts ();
35 return RetValue ? TRUE : FALSE;
36 }