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