]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/CpuDeadLoop.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / CpuDeadLoop.c
1 /** @file
2 Base Library CPU Functions for all architectures.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9
10
11 #include <Base.h>
12 #include <Library/BaseLib.h>
13
14 /**
15 Executes an infinite loop.
16
17 Forces the CPU to execute an infinite loop. A debugger may be used to skip
18 past the loop and the code that follows the loop must execute properly. This
19 implies that the infinite loop must not cause the code that follow it to be
20 optimized away.
21
22 **/
23 VOID
24 EFIAPI
25 CpuDeadLoop (
26 VOID
27 )
28 {
29 volatile UINTN Index;
30
31 for (Index = 0; Index == 0;);
32 }