Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:13

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup RTEMSImplClassic
0007  *
0008  * @brief This header file defines the Initialization Manager API.
0009  */
0010 
0011 /*
0012  * Copyright (C) 2015, 2021 embedded brains GmbH & Co. KG
0013  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
0014  *
0015  * Redistribution and use in source and binary forms, with or without
0016  * modification, are permitted provided that the following conditions
0017  * are met:
0018  * 1. Redistributions of source code must retain the above copyright
0019  *    notice, this list of conditions and the following disclaimer.
0020  * 2. Redistributions in binary form must reproduce the above copyright
0021  *    notice, this list of conditions and the following disclaimer in the
0022  *    documentation and/or other materials provided with the distribution.
0023  *
0024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0025  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0026  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0027  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0028  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0029  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0030  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0031  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0032  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0033  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0034  * POSSIBILITY OF SUCH DAMAGE.
0035  */
0036 
0037 /*
0038  * This file is part of the RTEMS quality process and was automatically
0039  * generated.  If you find something that needs to be fixed or
0040  * worded better please post a report or patch to an RTEMS mailing list
0041  * or raise a bug report:
0042  *
0043  * https://www.rtems.org/bugs.html
0044  *
0045  * For information on updating and regenerating please refer to the How-To
0046  * section in the Software Requirements Engineering chapter of the
0047  * RTEMS Software Engineering manual.  The manual is provided as a part of
0048  * a release.  For development sources please refer to the online
0049  * documentation at:
0050  *
0051  * https://docs.rtems.org
0052  */
0053 
0054 /* Generated from spec:/rtems/init/if/header */
0055 
0056 #ifndef _RTEMS_INIT_H
0057 #define _RTEMS_INIT_H
0058 
0059 #include <stdint.h>
0060 #include <rtems/score/basedefs.h>
0061 
0062 #ifdef __cplusplus
0063 extern "C" {
0064 #endif
0065 
0066 /* Generated from spec:/rtems/init/if/group */
0067 
0068 /**
0069  * @defgroup RTEMSAPIClassicInit Initialization Manager
0070  *
0071  * @ingroup RTEMSAPIClassic
0072  *
0073  * @brief The Initialization Manager is responsible for initializing the
0074  *   system.
0075  *
0076  * The system initialization includes the initialization of the Board Support
0077  * Package, RTEMS, device drivers, the root filesystem, and the application.
0078  * The @ref RTEMSAPIClassicFatal is responsible for the system shutdown.
0079  */
0080 
0081 /* Generated from spec:/rtems/init/if/initialize-executive */
0082 
0083 /**
0084  * @ingroup RTEMSAPIClassicInit
0085  *
0086  * @brief Initializes the system and starts multitasking.
0087  *
0088  * Iterates through the system initialization linker set and invokes the
0089  * registered handlers.  The final step is to start multitasking.
0090  *
0091  * @par Notes
0092  * Errors in the initialization sequence are usually fatal and lead to a system
0093  * termination.
0094  *
0095  * @par Constraints
0096  * @parblock
0097  * The following constraints apply to this directive:
0098  *
0099  * * The directive should be called by boot_card() only.
0100  *
0101  * * The directive will not return to the caller.
0102  * @endparblock
0103  */
0104 RTEMS_NO_RETURN void rtems_initialize_executive( void );
0105 
0106 /* Generated from spec:/rtems/fatal/if/shutdown-executive */
0107 
0108 /**
0109  * @ingroup RTEMSAPIClassicFatal
0110  *
0111  * @brief Invokes the fatal error handler.
0112  *
0113  * @param fatal_code is the fatal code.
0114  *
0115  * This directive processes fatal errors.  The fatal source is set to
0116  * RTEMS_FATAL_SOURCE_EXIT.  The fatal code is set to the value of the
0117  * ``fatal_code`` parameter.
0118  *
0119  * @par Constraints
0120  * @parblock
0121  * The following constraints apply to this directive:
0122  *
0123  * * The directive may be called from within any runtime context.
0124  *
0125  * * The directive will not return to the caller.
0126  *
0127  * * The directive invokes the fatal error extensions in extension forward
0128  *   order.
0129  *
0130  * * The directive does not invoke handlers registered by atexit() or
0131  *   on_exit().
0132  *
0133  * * The directive may terminate the system.
0134  * @endparblock
0135  */
0136 RTEMS_NO_RETURN void rtems_shutdown_executive( uint32_t fatal_code );
0137 
0138 #ifdef __cplusplus
0139 }
0140 #endif
0141 
0142 #endif /* _RTEMS_INIT_H */