File tree 2 files changed +5
-15
lines changed 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ static void _scheduler_stack_check(struct rt_thread *thread)
120
120
121
121
rt_kprintf ("thread:%s stack overflow\n" , thread -> parent .name );
122
122
123
- level = rt_hw_interrupt_disable ();
123
+ level = rt_hw_local_irq_disable ();
124
+ rt_spin_lock (& _spinlock );
124
125
while (level );
125
126
}
126
127
#ifdef ARCH_CPU_STACK_GROWS_UPWARD
@@ -571,21 +572,21 @@ void rt_schedule(void)
571
572
572
573
#ifdef RT_USING_SIGNALS
573
574
/* check stat of thread for signal */
574
- level = rt_hw_interrupt_disable ( );
575
+ rt_spin_lock ( & ( current_thread -> spinlock ) );
575
576
if (current_thread -> stat & RT_THREAD_STAT_SIGNAL_PENDING )
576
577
{
577
578
extern void rt_thread_handle_sig (rt_bool_t clean_state );
578
579
579
580
current_thread -> stat &= ~RT_THREAD_STAT_SIGNAL_PENDING ;
580
581
581
- rt_hw_interrupt_enable ( level );
582
+ rt_spin_unlock ( & ( current_thread -> spinlock ) );
582
583
583
584
/* check signal status */
584
585
rt_thread_handle_sig (RT_TRUE );
585
586
}
586
587
else
587
588
{
588
- rt_hw_interrupt_enable ( level );
589
+ rt_spin_unlock ( & ( current_thread -> spinlock ) );
589
590
}
590
591
#endif /* RT_USING_SIGNALS */
591
592
Original file line number Diff line number Diff line change @@ -53,17 +53,6 @@ static void _signal_entry(void *parameter)
53
53
rt_thread_handle_sig (RT_FALSE );
54
54
55
55
#ifdef RT_USING_SMP
56
- {
57
- struct rt_cpu * pcpu = rt_cpu_self ();
58
-
59
- RT_ASSERT (pcpu -> current_thread -> cpus_lock_nest > 0 );
60
- pcpu -> current_thread -> cpus_lock_nest -- ;
61
- if (pcpu -> current_thread -> cpus_lock_nest == 0 )
62
- {
63
- pcpu -> current_thread -> scheduler_lock_nest -- ;
64
- }
65
-
66
- }
67
56
#else
68
57
/* return to thread */
69
58
tid -> sp = tid -> sig_ret ;
You can’t perform that action at this time.
0 commit comments