diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-09 15:06:50 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-09 15:06:50 -0500 |
commit | 30aa7922046a5a3474af640f7de613be5d806f96 (patch) | |
tree | e03df19f0a16c192f95f429a8f5dfe216d79ad6c /schedsim/shell/schedsim_smpsimple | |
parent | sched_cpu: add is_executing to context. (diff) | |
download | rtems-schedsim-30aa7922046a5a3474af640f7de613be5d806f96.tar.bz2 |
Now appears to run again
Diffstat (limited to 'schedsim/shell/schedsim_smpsimple')
-rw-r--r-- | schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c b/schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c index 0edefd1..98506c8 100644 --- a/schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c +++ b/schedsim/shell/schedsim_smpsimple/wrap_thread_dispatch.c @@ -26,20 +26,30 @@ extern void __real__Thread_Dispatch(void); void Init__wrap__Thread_Dispatch() { - last_heir = (Thread_Control_ptr *) calloc( sizeof( Thread_Control_ptr ), _SMP_Processor_count ); - last_executing = (Thread_Control_ptr *) calloc( sizeof( Thread_Control_ptr ), _SMP_Processor_count ); + last_heir = (Thread_Control_ptr *) calloc( + sizeof( Thread_Control_ptr ), + _SMP_Processor_count + ); + last_executing = (Thread_Control_ptr *) calloc( + sizeof( Thread_Control_ptr ), + _SMP_Processor_count + ); } void check_heir_and_executing(void) { - if ( last_heir[Schedsim_Current_cpu] != _Thread_Heir ) - PRINT_HEIR(); + uint32_t level; - if ( last_executing[Schedsim_Current_cpu] != _Thread_Executing ) - PRINT_EXECUTING(); + _ISR_Disable_without_giant( level ); + if ( last_heir[Schedsim_Current_cpu] != _Thread_Heir ) + PRINT_HEIR(); - last_heir[Schedsim_Current_cpu] = _Thread_Heir; - last_executing[Schedsim_Current_cpu] = _Thread_Executing; + if ( last_executing[Schedsim_Current_cpu] != _Thread_Executing ) + PRINT_EXECUTING(); + + last_heir[Schedsim_Current_cpu] = _Thread_Heir; + last_executing[Schedsim_Current_cpu] = _Thread_Executing; + _ISR_Enable_without_giant( level ); } void __wrap__Thread_Dispatch(void) |