Changeset a0c7aa55 in rtems


Ignore:
Timestamp:
Nov 14, 2012, 1:54:09 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a12f7e9
Parents:
b1e8a58
git-author:
Sebastian Huber <sebastian.huber@…> (11/14/12 13:54:09)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/12 14:33:13)
Message:

score: Add RTEMS_FATAL_SOURCE_ASSERT

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/__assert.c

    rb1e8a58 ra0c7aa55  
    3535    (func) ? func : ""
    3636  );
    37   rtems_fatal_error_occurred(0);
     37  rtems_fatal( RTEMS_FATAL_SOURCE_ASSERT, (rtems_fatal_code) func );
    3838}
    3939#endif
  • cpukit/score/include/rtems/score/interr.h

    rb1e8a58 ra0c7aa55  
    8383   */
    8484  RTEMS_FATAL_SOURCE_BSP_SPECIFIC,
     85
     86  /**
     87   * @brief Fatal source of assert().
     88   *
     89   * The fatal code is the pointer value of the function string.
     90   */
     91  RTEMS_FATAL_SOURCE_ASSERT,
    8592
    8693  /**
  • testsuites/sptests/spfatal10/testcase.h

    rb1e8a58 ra0c7aa55  
    1111#include <assert.h>
    1212
     13static const char func [] = "Init";
     14
    1315#define FATAL_ERROR_TEST_NAME            "10"
    1416#define FATAL_ERROR_DESCRIPTION          "asserting with non-NULL strings..."
    15 #define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
     17#define FATAL_ERROR_EXPECTED_SOURCE      RTEMS_FATAL_SOURCE_ASSERT
    1618#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
    17 #define FATAL_ERROR_EXPECTED_ERROR       0
     19#define FATAL_ERROR_EXPECTED_ERROR       ((rtems_fatal_code) func)
    1820
    1921void force_error()
    2022{
    21   __assert_func( __FILE__, __LINE__, "Init", "forced" );
     23  __assert_func( __FILE__, __LINE__, func, "forced" );
    2224
    2325  /* we will not run this far */
  • testsuites/sptests/spfatal11/testcase.h

    rb1e8a58 ra0c7aa55  
    1313#define FATAL_ERROR_TEST_NAME            "11"
    1414#define FATAL_ERROR_DESCRIPTION          "asserting with non-NULL strings..."
    15 #define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
     15#define FATAL_ERROR_EXPECTED_SOURCE      RTEMS_FATAL_SOURCE_ASSERT
    1616#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
    1717#define FATAL_ERROR_EXPECTED_ERROR       0
Note: See TracChangeset for help on using the changeset viewer.