151 lines
4.1 KiB
C
151 lines
4.1 KiB
C
/*
|
|
******************************************************************************
|
|
* SOURCE FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipcom_exit.c,v $ $Revision: 1.16 $
|
|
* $Source: /home/interpeak/CVSRoot/ipcom/port/src/ipcom_exit.c,v $
|
|
* $Author: ulf $ $Date: 2010-09-09 08:55:22 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipcom_config.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#if defined(IP_PORT_OSE) || defined(IP_PORT_OSE5)
|
|
#include <ose.h>
|
|
#endif
|
|
|
|
#ifdef IP_PORT_VXWORKS
|
|
#include <vxWorks.h>
|
|
#endif
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "ipcom_clib.h"
|
|
#include "ipcom_os.h"
|
|
#include "ipcom_shell.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 EXTERN PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 7 LOCAL PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 8 DATA
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 9 LOCAL FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 10 PUBLIC FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipcom_abort
|
|
*===========================================================================
|
|
* Description:
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
#if defined(IPCOM_ABORT) && IPCOM_ABORT == 1
|
|
IP_PUBLIC void
|
|
ipcom_abort(void)
|
|
{
|
|
IP_PANIC();
|
|
|
|
#if defined(IP_PORT_OSE5)
|
|
efs_abort(__FILE__, __LINE__);
|
|
#elif defined(IP_PORT_RTCORE)
|
|
ipcom_proc_exit();
|
|
#elif !defined(IP_PORT_ITRON) && \
|
|
(!defined(IP_PORT_INTEGRITY) || !defined(INT_178B))
|
|
abort();
|
|
#endif
|
|
}
|
|
#endif
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipcom_exit
|
|
*===========================================================================
|
|
* Description:
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
#if defined(IPCOM_EXIT) && IPCOM_EXIT == 1
|
|
IP_PUBLIC void
|
|
ipcom_exit(int status)
|
|
{
|
|
#if IPCOM_USE_SHELL == IPCOM_SHELL_IPCOM
|
|
ipcom_shell_exit(status);
|
|
#elif defined(IP_PORT_OSE) || defined(IP_PORT_OSE5)
|
|
exit(status);
|
|
#else
|
|
IPCOM_UNUSED_ARG(status);
|
|
ipcom_proc_exit();
|
|
#endif
|
|
}
|
|
#endif
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|