source: rtems/cpukit/sapi/include/rtems/init.h @ 143696a

5
Last change on this file since 143696a was 143696a, checked in by Sebastian Huber <sebastian.huber@…>, on 10/16/15 at 06:15:03

basedefs.h: Add and use RTEMS_NO_RETURN

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/**
2 * @file
3 *
4 * @brief Constants and Structures Associated
5 * with the Initialization Manager
6 *
7 * This include file contains all the constants and structures associated
8 * with the Initialization Manager.  This manager is responsible for
9 * initializing RTEMS, creating and starting all configured initialization
10 * tasks, invoking the initialization routine for each user-supplied device
11 * driver, and initializing the optional multiprocessor layer.
12 *
13 * This manager provides directives to:
14 *
15 *    + initialize the RTEMS executive
16 *    + shutdown the RTEMS executive
17 */
18
19/*
20 *  COPYRIGHT (c) 1989-2008.
21 *  On-Line Applications Research Corporation (OAR).
22 *
23 *  The license and distribution terms for this file may be
24 *  found in the file LICENSE in this distribution or at
25 *  http://www.rtems.org/license/LICENSE.
26 */
27
28#ifndef _RTEMS_INIT_H
29#define _RTEMS_INIT_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <rtems/rtems/types.h>
36#include <rtems/config.h>
37#include <rtems/rtems/intr.h>
38
39#if defined(RTEMS_MULTIPROCESSING)
40/**
41 * The following defines the default Multiprocessing Configuration
42 * Table.  This table is used in a single processor system.
43 */
44extern const rtems_multiprocessing_table
45  _Initialization_Default_multiprocessing_table;
46#endif
47
48/**
49 * @brief RTEMS data structures initialization.
50 *
51 * This routine implements the portion of the RTEMS initializatin process
52 * that involves initializing data structures to a state that scheduling
53 * can occur in a consistent manner.
54 */
55void rtems_initialize_data_structures(void);
56
57/**
58 * @brief RTEMS initialization before the device drivers are initialized.
59 *
60 * This routine implements the portion of RTEMS initialization that
61 * is done immediately before device drivers are initialized.
62 */
63void rtems_initialize_before_drivers(void);
64
65/**
66 * @brief RTEMS initialization that initializes all device drivers.
67 *
68 * This routine implements the portion of RTEMS initialization that
69 * initializes all device drivers.
70 */
71void rtems_initialize_device_drivers(void);
72
73/**
74 * @brief Starts the multitasking.
75 *
76 * This directive initiates multitasking and performs a context switch to the
77 * first user application task and may enable interrupts as a side-effect of
78 * that context switch.  The context switch saves the executing context.  The
79 * application runs now.  The directive rtems_shutdown_executive() will return
80 * to the saved context.  The exit() function will use this directive.
81 *
82 * After a return to the saved context a fatal system state is reached.  The
83 * fatal source is RTEMS_FATAL_SOURCE_EXIT with a fatal code set to the value
84 * passed to rtems_shutdown_executive().
85 *
86 * This directive does not return.
87 */
88void rtems_initialize_start_multitasking(void)
89  RTEMS_NO_RETURN;
90
91/**
92 * @brief Shutdown the RTEMS environment.
93 *
94 * This routine implements the rtems_shutdown_executive directive.  The
95 * invocation of this directive results in the RTEMS environment being
96 * shutdown and multitasking halted.  From the application's perspective,
97 * invocation of this directive results in the rtems_initialize_executive
98 * directive exitting to the startup code which invoked it.
99 */
100void rtems_shutdown_executive(
101  uint32_t   result
102) RTEMS_NO_RETURN;
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif
109/* end of include file */
Note: See TracBrowser for help on using the repository browser.