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

4.115
Last change on this file since e22af78 was 72f63eef, checked in by Josh Oguin <josh.oguin@…>, on 11/19/14 at 20:34:40

libcsupport/src/newlibc_exit.c: Remove dead code

This was flagged as an empty for statement by CodeSonar? but is actually
unreachable code that should be removed.

  • Property mode set to 100644
File size: 989 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(__m32r__)
26      #define FINI_SYMBOL __fini
27    #elif defined(__ARM_EABI__)
28      #define FINI_SYMBOL __libc_fini_array
29    #else
30      #define FINI_SYMBOL _fini
31    #endif
32
33    extern void FINI_SYMBOL( void );
34  #endif
35
36void _exit(int status)
37{
38  /*
39   *  If the toolset uses init/fini sections, then we need to
40   *  run the global destructors now.
41   */
42  #if defined(FINI_SYMBOL)
43    FINI_SYMBOL();
44  #endif
45
46  (*rtems_libio_exit_helper)();
47  rtems_shutdown_executive(status);
48  /* does not return */
49}
50
51#endif
Note: See TracBrowser for help on using the repository browser.