1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 19 //Implementation file for OsclJump class, 20 //for use with the setjmp/longjmp error handler. 21 22 #include "oscl_error_imp.h" 23 24 #ifdef PVERROR_IMP_JUMPS 25 26 #include "oscl_assert.h" 27 28 29 //////////////////////////////////////////////////////////////////// StaticJump(int jmpcode)30OSCL_EXPORT_REF void OsclJump::StaticJump(int jmpcode) 31 //jump to latest jumpmark 32 { 33 int32 error; 34 OsclErrorTrapImp *trap = OsclErrorTrapImp::GetErrorTrap(error); 35 if (!trap) 36 { 37 //Note: you can't leave here, since leave would 38 //invoke this routine again. It is not safe to return 39 //either, because calling code is expecting an execution 40 //end. 41 OSCL_ASSERT(false); 42 _OSCL_Abort(); 43 } 44 else 45 { 46 trap->iJumpData->Jump(jmpcode); 47 } 48 } 49 50 51 #endif 52 53 54 55 56