Changeset 8e7db68c in rtems


Ignore:
Timestamp:
Apr 14, 2014, 9:05:04 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
e91ab8c
Parents:
4d58458
git-author:
Joel Sherrill <joel.sherrill@…> (04/14/14 21:05:04)
git-committer:
Joel Sherrill <joel.sherrill@…> (05/30/14 20:07:39)
Message:

Minor conditionals to enable building Scheduler Simulator on GNU/Linux

  • rtems/score/assert.h: Scheduler Simulator uses glibc assert.h on GNU/Linux. This will likely need to be adjusted more for other host compilers and C libraries. Also disable _Assert_Not_reached() because some of these paths do actually return to the called on the Scheduler Simulator.
  • basedefs.h: Do not use noreturn attribute when on Scheduler Simulator. Paths which context switch can return to the command interpreter on the Scheduler Simulator.
Location:
cpukit/score/include/rtems/score
Files:
2 edited

Legend:

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

    r4d58458 r8e7db68c  
    3131 */
    3232#if defined( RTEMS_DEBUG )
    33   #define _Assert( _e ) \
    34     ( ( _e ) ? \
    35       ( void ) 0 : \
    36         __assert_func( __FILE__, __LINE__, __ASSERT_FUNC, #_e ) )
     33  #if !defined( RTEMS_SCHEDSIM )
     34    /* __ASSERT_FUNC is newlib. */
     35    #define _Assert( _e ) \
     36      ( ( _e ) ? \
     37        ( void ) 0 : \
     38          __assert_func( __FILE__, __LINE__, __ASSERT_FUNC, #_e ) )
     39  #else
     40    /* __ASSERT_FUNCTION is glibc. */
     41    #if defined(__ASSERT_FUNCTION)
     42      #define _Assert( _e ) \
     43        ( ( _e ) ? \
     44          ( void ) 0 : \
     45            __assert_fail( #_e, __FILE__, __LINE__, __ASSERT_FUNCTION ) )
     46    #else
     47       #error "What does assert.h use?"
     48    #endif
     49  #endif
     50
    3751#else
    3852  #define _Assert( _e ) ( ( void ) 0 )
     
    7185 * @brief Asserts that this point is not reached during run-time.
    7286 */
     87#if RTEMS_SCHEDSIM
     88#define _Assert_Not_reached()
     89#else
    7390#define _Assert_Not_reached() _Assert( 0 )
     91#endif
    7492
    7593#ifdef __cplusplus
  • cpukit/score/include/rtems/score/basedefs.h

    r4d58458 r8e7db68c  
    154154 *  rtems_fatal_error_occurred and _Terminate.
    155155 */
    156 #ifdef __GNUC__
     156#if defined(RTEMS_SCHEDSIM)
     157  #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
     158#elif defined(__GNUC__)
    157159  #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE \
    158160      __attribute__ ((noreturn))
Note: See TracChangeset for help on using the changeset viewer.