]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/LongJump.c
Update the Guid Value of Ext SCSI Pass Thru Protocol
[mirror_edk2.git] / MdePkg / Library / BaseLib / LongJump.c
1 /** @file
2 Long Jump functions.
3
4 Copyright (c) 2006, Intel Corporation
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 Module Name: LongJump.c
14
15 **/
16
17 #include "BaseLibInternals.h"
18
19 /**
20 Restores the CPU context that was saved with SetJump().
21
22 Restores the CPU context from the buffer specified by JumpBuffer.
23 This function never returns to the caller.
24 Instead is resumes execution based on the state of JumpBuffer.
25
26 If JumpBuffer is NULL, then ASSERT().
27 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().
28 If Value is 0, then ASSERT().
29
30 @param JumpBuffer A pointer to CPU context buffer.
31 @param Value The value to return when the SetJump() context is restored.
32
33 **/
34 VOID
35 EFIAPI
36 LongJump (
37 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
38 IN UINTN Value
39 )
40 {
41 InternalAssertJumpBuffer (JumpBuffer);
42 ASSERT (Value != 0);
43
44 InternalLongJump (JumpBuffer, Value);
45 }