X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FCpu.c;h=e3daf38f83317999c4623dde8d53675138c9dd48;hb=HEAD;hp=cc7a608f83e8d2e409ba7b4c9b93ac2096e4c244;hpb=878ddf1fc3540a715f63594ed22b6929e881afb4;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseLib/Cpu.c b/MdePkg/Library/BaseLib/Cpu.c index cc7a608f83..e3daf38f83 100644 --- a/MdePkg/Library/BaseLib/Cpu.c +++ b/MdePkg/Library/BaseLib/Cpu.c @@ -1,23 +1,14 @@ /** @file Base Library CPU Functions for all architectures. - Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: Cpu.c + Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -/** - Disables CPU interrupts and returns the interrupt state prior to the disable - operation. +#include "BaseLibInternals.h" +/** Disables CPU interrupts and returns the interrupt state prior to the disable operation. @@ -31,7 +22,7 @@ SaveAndDisableInterrupts ( VOID ) { - BOOLEAN InterruptState; + BOOLEAN InterruptState; InterruptState = GetInterruptState (); DisableInterrupts (); @@ -46,7 +37,7 @@ SaveAndDisableInterrupts ( InterruptState is FALSE, then interrupts are disabled. InterruptState is returned. - @param InterruptState TRUE if interrupts should enabled. FALSE if + @param InterruptState TRUE if interrupts should be enabled. FALSE if interrupts should be disabled. @return InterruptState @@ -55,7 +46,7 @@ SaveAndDisableInterrupts ( BOOLEAN EFIAPI SetInterruptState ( - IN BOOLEAN InterruptState + IN BOOLEAN InterruptState ) { if (InterruptState) { @@ -63,5 +54,6 @@ SetInterruptState ( } else { DisableInterrupts (); } + return InterruptState; }