]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/LongJump.c
Modified coding style, removed unnecessary comments and "offset" key words.
[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 VOID
18 EFIAPI
19 InternalAssertJumpBuffer (
20 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
21 );
22
23 VOID
24 EFIAPI
25 InternalLongJump (
26 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
27 IN UINTN Value
28 );
29
30 /**
31 Restores the CPU context that was saved with SetJump().
32
33 Restores the CPU context from the buffer specified by JumpBuffer.
34 This function never returns to the caller.
35 Instead is resumes execution based on the state of JumpBuffer.
36
37 If JumpBuffer is NULL, then ASSERT().
38 If Value is 0, then ASSERT().
39
40 @param JumpBuffer A pointer to CPU context buffer.
41 @param Value The value to return when the SetJump() context is restored.
42
43 **/
44 VOID
45 EFIAPI
46 LongJump (
47 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
48 IN UINTN Value
49 )
50 {
51 InternalAssertJumpBuffer (JumpBuffer);
52 ASSERT (Value != 0);
53
54 InternalLongJump (JumpBuffer, Value);
55 }