sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * FUNCTION sl@0: * <>---abnormal termination of a program sl@0: * INDEX sl@0: * abort sl@0: * ANSI_SYNOPSIS sl@0: * #include sl@0: * void abort(void); sl@0: * TRAD_SYNOPSIS sl@0: * #include sl@0: * void abort(); sl@0: * Use <> to signal that your program has detected a condition it sl@0: * cannot deal with. Normally, <> ends your program's execution. sl@0: * Before terminating your program, <> raises the exception <> sl@0: * (using `<>'). If you have used <> to register sl@0: * an exception handler for this condition, that handler has the sl@0: * opportunity to retain control, thereby avoiding program termination. sl@0: * In this implementation, <> does not perform any stream- or sl@0: * file-related cleanup (the host environment may do so; if not, you can sl@0: * arrange for your program to do its own cleanup with a <> sl@0: * exception handler). sl@0: * RETURNS sl@0: * <> does not return to its caller. sl@0: * PORTABILITY sl@0: * ANSI C requires <>. sl@0: * Supporting OS subroutines required: <>, <>. sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #include /* for definition of _exit() */ sl@0: /* #include */ sl@0: sl@0: EXPORT_C void sl@0: #ifdef EKA2 sl@0: do_abort (void) _ATTRIBUTE((noreturn)) // Export in place of 'abort()' on EKA2 for binary compatibility. sl@0: #else sl@0: abort (void) _ATTRIBUTE((noreturn)) sl@0: #endif sl@0: { sl@0: for (;;) sl@0: { sl@0: /* raise (SIGABRT); */ sl@0: _exit (1); sl@0: } sl@0: } sl@0: sl@0: #if (defined (__ARMCC__) || defined (__X86GCC__)) sl@0: void abort (void) _ATTRIBUTE((noreturn)) sl@0: { sl@0: do_abort(); sl@0: } sl@0: #endif