source: rtems/cpukit/sapi/src/exshutdown.c @ 56e17106

4.104.115
Last change on this file since 56e17106 was 56e17106, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/09 at 13:09:48

2009-09-04 Sebastian Huber <Sebastian.Huber@…>

  • rtems/src/taskmode.c, sapi/src/exshutdown.c, score/include/rtems/score/sysstate.h, score/inline/rtems/score/sysstate.inl: Added _System_state_Is_shutdown(). Removed direct uses of _System_state_Current. Documentation.
  • Property mode set to 100644
File size: 948 bytes
Line 
1/*
2 *  Initialization Manager
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/system.h>
19#include <rtems/score/sysstate.h>
20#include <rtems/score/thread.h>
21
22/*
23 *  rtems_shutdown_executive
24 *
25 *  This kernel routine shutdowns the executive.  It halts multitasking
26 *  and returns control to the application execution "thread" which
27 *  initialially invoked the rtems_initialize_executive directive.
28 *
29 *  Input parameters:   NONE
30 *
31 *  Output parameters:  NONE
32 */
33
34void rtems_shutdown_executive(
35   uint32_t   result
36)
37{
38  if ( !_System_state_Is_shutdown( _System_state_Get() ) ) {
39    _System_state_Set( SYSTEM_STATE_SHUTDOWN );
40    _Thread_Stop_multitasking();
41  }
42}
Note: See TracBrowser for help on using the repository browser.