]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c
remove unnecessary comments introduced by tools from MdePkg. The regular express...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ebc / SetJumpLongJump.c
CommitLineData
f1baef62 1/** @file\r
2 Switch Stack functions.\r
3\r
4 Copyright (c) 2006, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
f1baef62 13**/\r
1efcc4ae 14\r
c6aa36b6 15#include <BaseLibInternals.h>\r
f1baef62 16\r
17/**\r
18 Worker function that checks ASSERT condition for JumpBuffer\r
19\r
20 Checks ASSERT condition for JumpBuffer.\r
21\r
22 If JumpBuffer is NULL, then ASSERT().\r
23 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().\r
24\r
25 @param JumpBuffer A pointer to CPU context buffer.\r
26\r
27**/\r
28VOID\r
38bbd3d9 29EFIAPI\r
f1baef62 30InternalAssertJumpBuffer (\r
31 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer\r
32 );\r
33\r
34/**\r
35 Saves the current CPU context that can be restored with a call to LongJump() and returns 0.\r
36\r
c6aa36b6 37 Saves the current CPU context in the buffer specified by JumpBuffer and returns 0. The initial\r
38 call to SetJump() must always return 0. Subsequent calls to LongJump() cause a non-zero\r
39 value to be returned by SetJump().\r
f1baef62 40\r
41 If JumpBuffer is NULL, then ASSERT().\r
42 For IPF CPUs, if JumpBuffer is not aligned on a 16-byte boundary, then ASSERT().\r
43\r
44 @param JumpBuffer A pointer to CPU context buffer.\r
c6aa36b6 45\r
f1baef62 46**/\r
47UINTN\r
48EFIAPI\r
49SetJump (\r
50 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer\r
51 )\r
52{\r
53 InternalAssertJumpBuffer (JumpBuffer);\r
54 return 0;\r
55}\r
56\r
57/**\r
58 Restores the CPU context that was saved with SetJump().\r
59\r
60 Restores the CPU context from the buffer specified by JumpBuffer.\r
61 This function never returns to the caller.\r
62 Instead is resumes execution based on the state of JumpBuffer.\r
63\r
64 @param JumpBuffer A pointer to CPU context buffer.\r
65 @param Value The value to return when the SetJump() context is restored.\r
66\r
67**/\r
68VOID\r
69EFIAPI\r
70InternalLongJump (\r
71 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,\r
72 IN UINTN Value\r
73 )\r
74{\r
75 //\r
76 // This function cannot work on EBC\r
77 //\r
78 ASSERT (FALSE);\r
79}\r