Changeset 2d51251 in rtems-schedsim for schedsim/rtems/sched_cpu/rtems/score/cpu.h


Ignore:
Timestamp:
May 9, 2014, 1:35:58 PM (6 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
master
Children:
b1b31c0
Parents:
0745eed
git-author:
Jennifer Averett <jennifer.averett@…> (05/09/14 13:35:58)
git-committer:
Jennifer Averett <jennifer.averett@…> (05/09/14 13:37:18)
Message:

schedsim: Add smp support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • schedsim/rtems/sched_cpu/rtems/score/cpu.h

    r0745eed r2d51251  
    721721
    722722/**
     723 *  XXX fake cpu isr level variable
     724 */
     725extern int _CPU_ISR_level_on_sched_cpu;
     726
     727/**
    723728 *  @ingroup CPUInterrupt
    724729 *  Disable all interrupts for an RTEMS critical section.  The previous
     
    733738#define _CPU_ISR_Disable( _isr_cookie ) \
    734739  { \
    735     (_isr_cookie) = 0;   /* do something to prevent warnings */ \
     740    (_isr_cookie) = _CPU_ISR_level_on_sched_cpu; \
     741    _CPU_ISR_level_on_sched_cpu = 1; \
    736742  }
    737743
     
    750756#define _CPU_ISR_Enable( _isr_cookie )  \
    751757  { \
     758    _CPU_ISR_level_on_sched_cpu = (_isr_cookie); \
    752759  }
    753760
     
    788795#define _CPU_ISR_Set_level( new_level ) \
    789796  { \
     797    _CPU_ISR_level_on_sched_cpu = (new_level); \
    790798  }
    791799
     
    801809 *  XXX document implementation including references if appropriate
    802810 */
    803 uint32_t   _CPU_ISR_Get_level( void );
     811#define _CPU_ISR_Get_level() (uint32_t) _CPU_ISR_level_on_sched_cpu
    804812
    805813/* end of ISR handler macros */
     
    12211229  #define _CPU_Context_switch_to_first_task_smp(_context )
    12221230
    1223   RTEMS_COMPILER_PURE_ATTRIBUTE static inline uint32_t
    1224     _CPU_SMP_Get_current_processor( void )
    1225   {
    1226     return 0;
    1227   }
    1228 
    1229   #define _CPU_SMP_Send_interrupt( dest);
    1230 
    1231   static inline void _CPU_SMP_Processor_event_broadcast( void )
    1232   {
    1233   }
    1234 
    1235   static inline void _CPU_SMP_Processor_event_receive( void )
    1236   {
    1237   }
     1231  uint32_t _CPU_SMP_Get_current_processor( void );
     1232  uint32_t _CPU_SMP_Initialize( void );
     1233  bool _CPU_SMP_Start_processor( uint32_t cpu_index );
     1234  void _CPU_SMP_Finalize_initialization( uint32_t cpu_count );
     1235  void _CPU_SMP_Send_interrupt( uint32_t target_processor_index );
     1236  void _CPU_SMP_Processor_event_broadcast( void );
     1237  void _CPU_SMP_Processor_event_receive( void );
    12381238#endif
    12391239typedef struct {
Note: See TracChangeset for help on using the changeset viewer.