source: rtems/cpukit/libcsupport/src/newlibc_exit.c @ f5201df

5
Last change on this file since f5201df was f5201df, checked in by Joel Sherrill <joel.sherrill@…>, on 12/15/15 at 17:25:01

Remove M32R architecture

updates #2446.

  • Property mode set to 100644
File size: 928 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1994 by Division Incorporated
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.org/license/LICENSE.
7 *
8 */
9
10#if HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems.h>
15
16#if defined(RTEMS_NEWLIB)
17#include <rtems/libio.h>
18
19#include <stdio.h>
20#include <unistd.h>
21
22/* FIXME: These defines are a blatant hack */
23
24  #if defined(__USE_INIT_FINI__)
25    #if defined(__ARM_EABI__)
26      #define FINI_SYMBOL __libc_fini_array
27    #else
28      #define FINI_SYMBOL _fini
29    #endif
30
31    extern void FINI_SYMBOL( void );
32  #endif
33
34void _exit(int status)
35{
36  /*
37   *  If the toolset uses init/fini sections, then we need to
38   *  run the global destructors now.
39   */
40  #if defined(FINI_SYMBOL)
41    FINI_SYMBOL();
42  #endif
43
44  (*rtems_libio_exit_helper)();
45  rtems_shutdown_executive(status);
46  /* does not return */
47}
48
49#endif
Note: See TracBrowser for help on using the repository browser.