]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/CpuDeadLoop.c
325be96d934ac23b98807a5d3fc1d9351ef236e1
[mirror_edk2.git] / MdePkg / Library / BaseLib / CpuDeadLoop.c
1 /** @file
2 Base Library CPU Functions for all architectures.
3
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 //
16 // Include common header file for this module.
17 //
18
19 #include <Base.h>
20 #include <Library/BaseLib.h>
21
22 /**
23 Executes an infinite loop.
24
25 Forces the CPU to execute an infinite loop. A debugger may be used to skip
26 past the loop and the code that follows the loop must execute properly. This
27 implies that the infinite loop must not cause the code that follow it to be
28 optimized away.
29
30 **/
31 VOID
32 EFIAPI
33 CpuDeadLoop (
34 VOID
35 )
36 {
37 volatile UINTN Index;
38
39 for (Index = 0; 0 == Index;);
40 }