Home | History | Annotate | Download | only in Main
      1 /** @file
      2   The longjmp function.
      3   The C standard requires that longjmp be a function and not a macro.
      4 
      5   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
      6   This program and the accompanying materials are licensed and made available under
      7   the terms and conditions of the BSD License that accompanies this distribution.
      8   The full text of the license may be found at
      9   http://opensource.org/licenses/bsd-license.
     10 
     11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 **/
     14 #include  <Library/BaseLib.h>
     15 #include  <setjmp.h>
     16 
     17 void longjmp(jmp_buf env, int val)
     18 {
     19   LongJump(env, (UINTN)((val == 0) ? 1 : val));
     20 }
     21