Changeset 42fce5d3 in rtems


Ignore:
Timestamp:
01/04/08 06:38:06 (15 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
74ee68d
Parents:
4779963
Message:

2008-01-03 Till Straumann <strauman@…>

  • score/src/threadhandler.c, sapi/src/exshutdown.c: cannot call _fini via atexit() from rtems_shutdown_executive() because at the point where rtems_shutdown_executive is called the C-library is already dead. Instead, register an atexit(_fini) after calling _init().
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r4779963 r42fce5d3  
     12008-01-03      Till Straumann <strauman@slac.stanford.edu>
     2
     3        * score/src/threadhandler.c, sapi/src/exshutdown.c:
     4        cannot call _fini via atexit() from rtems_shutdown_executive()
     5        because at the point where rtems_shutdown_executive is called
     6        the C-library is already dead.
     7        Instead, register an atexit(_fini) after calling _init().
     8
    192007-12-28      Joel Sherrill <joel.sherrill@OARcorp.com>
    210
  • cpukit/sapi/src/exshutdown.c

    r4779963 r42fce5d3  
    2020#include <rtems/score/thread.h>
    2121
    22 #if defined(__USE_INIT_FINI__)
    23 #include <stdlib.h> /* for atexit() */
    24 #endif
    25 
    2622/*
    2723 *  rtems_shutdown_executive
     
    4137{
    4238  if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
    43 
    44     #if defined(__USE_INIT_FINI__)
    45       extern void _fini( void );
    46       atexit( _fini );
    47     #endif
    4839    _System_state_Set( SYSTEM_STATE_SHUTDOWN );
    4940    _Thread_Stop_multitasking();
  • cpukit/score/src/threadhandler.c

    r4779963 r42fce5d3  
    3030#include <rtems/score/userext.h>
    3131#include <rtems/score/wkspace.h>
     32
     33#if defined(__USE_INIT_FINI__)
     34#include <stdlib.h> /* for atexit() */
     35#endif
    3236
    3337/*PAGE
     
    126130   */
    127131  if (!doneCons) /* && (volatile void *)_init) */
     132  {
     133    extern void _fini( void );
    128134    _init ();
     135    atexit( _fini );
     136  }
    129137#endif
    130138#if defined(__USE__MAIN__)
Note: See TracChangeset for help on using the changeset viewer.