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