Changeset bf338f04 in rtems


Ignore:
Timestamp:
Jul 27, 2021, 8:09:05 AM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
79b94a2d
Parents:
c7b4eca7
git-author:
Sebastian Huber <sebastian.huber@…> (07/27/21 08:09:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/28/21 06:39:54)
Message:

score: Remove _Internal_errors_What_happened

Users have access to the fatal error source and code though the fatal error
extension. The user-specific fatal error handling should be done in statically
initialized fatal error handlers. The _Internal_errors_What_happened was
updated after the fatal error extension. In addition, there was no API to get
the information stored in _Internal_errors_What_happened. In SMP
configurations, this object could contain a mix of different fatal errors.
Remove this object to save some bytes of storage.

Files:
3 edited

Legend:

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

    rc7b4eca7 rbf338f04  
    216216
    217217/**
    218  *  This type holds the fatal error information.
    219  */
    220 typedef struct {
    221   /** This is the source of the error. */
    222   Internal_errors_Source  the_source;
    223   /** This is the error code. */
    224   Internal_errors_t       the_error;
    225 } Internal_errors_Information;
    226 
    227 /**
    228  *  When a fatal error occurs, the error information is stored here.
    229  */
    230 extern Internal_errors_Information _Internal_errors_What_happened;
    231 
    232 /**
    233218 * @brief Initiates system termination.
    234219 *
     
    254239 * the non-initial extensions will be not called.
    255240 *
    256  * Once all fatal handler executed the error information will be stored to
    257  * _Internal_errors_What_happened and the system state is set to
     241 * Once all fatal handler executed the system state is set to
    258242 * SYSTEM_STATE_TERMINATED.
    259243 *
  • cpukit/score/src/interr.c

    rc7b4eca7 rbf338f04  
    55 *
    66 * @brief This source file contains the definition of ::_System_state_Current
    7  *   and ::_Internal_errors_What_happened and implementation of _Terminate() and
    8  *   _Internal_error().
     7 *   and the implementation of _Terminate() and _Internal_error().
    98 */
    109
     
    2928System_state_Codes _System_state_Current;
    3029
    31 Internal_errors_Information _Internal_errors_What_happened;
    32 
    3330void _Terminate(
    3431  Internal_errors_Source the_source,
     
    3734{
    3835  _User_extensions_Fatal( the_source, the_error );
    39 
    40   _Internal_errors_What_happened.the_source = the_source;
    41   _Internal_errors_What_happened.the_error  = the_error;
    42 
    4336  _System_state_Set( SYSTEM_STATE_TERMINATED );
    44 
    4537  _SMP_Request_shutdown();
    46 
    4738  _CPU_Fatal_halt( the_source, the_error );
    4839
  • testsuites/sptests/spsize/size.c

    rc7b4eca7 rbf338f04  
    272272
    273273/*init.h*/      0                                         +
    274 
    275 /*interr.h*/    (sizeof _Internal_errors_What_happened)   +
    276274
    277275/*intr.h*/      0                                         +
Note: See TracChangeset for help on using the changeset viewer.