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