Changeset 1906a36 in rtems


Ignore:
Timestamp:
Nov 18, 2012, 6:51:10 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
67a9159e
Parents:
e5a2249a
git-author:
Sebastian Huber <sebastian.huber@…> (11/18/12 18:51:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/12 15:35:06)
Message:

score: Change _Internal_error_Occurred()

Call the fatal handlers of the user extensions before the update of
_Internal_errors_What_happened. This reduces the requirements on the
execution context further. Now a valid read-write data is only required
after the call to the fatal handlers.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/interr.h

    re5a2249a r1906a36  
    167167
    168168/**
    169  * @brief An internal or fatal error occurred.
     169 * @brief Initiates system termination.
    170170 *
    171171 * This routine is invoked when the application or the executive itself
    172  * determines that a fatal error has occurred.
    173  *
    174  * This function can be called in every system state provided the following
    175  * conditions are true
    176  * - the stack pointer is valid,
    177  * - the code memory is valid,
    178  * - the read-only data is valid, and
    179  * - the read-write data is accessible.
     172 * determines that a fatal error has occurred or a final system state is
     173 * reached (for example after exit()).
     174 *
     175 * The first action of this function is to call the fatal handler of the user
     176 * extensions.  For the initial extensions the following conditions are
     177 * required
     178 * - a valid stack pointer and enough stack space,
     179 * - a valid code memory, and
     180 * - valid read-only data.
     181 * For the initial extensions the read-write data (including BSS segment) is
     182 * not required.
     183 *
     184 * Non-initial extensions require in addition valid read-write data.  The BSP
     185 * may install an initial extension that performs a system reset.  In this case
     186 * the non-initial extensions will be not called.
     187 *
     188 * Once all fatal handler executed the error information will be stored to
     189 * _Internal_errors_What_happened and the system state is set to
     190 * SYSTEM_STATE_FAILED.
     191 *
     192 * The final step is to call the CPU specific _CPU_Fatal_halt().
     193 *
     194 * @see rtems_fatal_error_occurred() and rtems_fatal().
    180195 */
    181196void _Internal_error_Occurred(
  • cpukit/score/src/interr.c

    re5a2249a r1906a36  
    5151)
    5252{
     53  _User_extensions_Fatal( the_source, is_internal, the_error );
    5354
    5455  _Internal_errors_What_happened.the_source  = the_source;
    5556  _Internal_errors_What_happened.is_internal = is_internal;
    5657  _Internal_errors_What_happened.the_error   = the_error;
    57 
    58   _User_extensions_Fatal( the_source, is_internal, the_error );
    5958
    6059  _System_state_Set( SYSTEM_STATE_FAILED );
  • doc/user/fatal.t

    re5a2249a r1906a36  
    1010@section Introduction
    1111
    12 The fatal error manager processes all fatal or
    13 irrecoverable errors.  The directive provided by the fatal error
    14 manager is:
     12The fatal error manager processes all fatal or irrecoverable errors and other
     13sources of system termination (for example after exit()).  The directives
     14provided by the fatal error manager are:
    1515
    1616@itemize @bullet
     
    4141a fatal error.
    4242
    43 Each status or dynamic user extension set may include
     43Each static or dynamic user extension set may include
    4444a fatal error handler.  The fatal error handler in the static
    4545extension set can be used to provide access to debuggers and
Note: See TracChangeset for help on using the changeset viewer.