]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/LongJump.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / LongJump.c
CommitLineData
e1f414b6 1/** @file\r
2 Long Jump functions.\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
e1f414b6 7**/\r
8\r
1efcc4ae 9\r
f734a10a 10\r
e1f414b6 11\r
12#include "BaseLibInternals.h"\r
13\r
14/**\r
15 Restores the CPU context that was saved with SetJump().\r
16\r
9aa049d9 17 Restores the CPU context from the buffer specified by JumpBuffer. This\r
18 function never returns to the caller. Instead is resumes execution based on\r
19 the state of JumpBuffer.\r
e1f414b6 20\r
21 If JumpBuffer is NULL, then ASSERT().\r
22 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().\r
23 If Value is 0, then ASSERT().\r
24\r
9aa049d9 25 @param JumpBuffer A pointer to CPU context buffer.\r
26 @param Value The value to return when the SetJump() context is\r
27 restored and must be non-zero.\r
e1f414b6 28\r
29**/\r
30VOID\r
31EFIAPI\r
32LongJump (\r
33 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,\r
34 IN UINTN Value\r
35 )\r
36{\r
37 InternalAssertJumpBuffer (JumpBuffer);\r
38 ASSERT (Value != 0);\r
39\r
40 InternalLongJump (JumpBuffer, Value);\r
41}\r