[kernel] fix some smp code in particular build configurations

This commit is contained in:
Travis Geiselbrecht
2015-02-21 20:08:17 -08:00
parent 45d56cc2e1
commit adc07c0b69
2 changed files with 3 additions and 3 deletions

View File

@@ -520,7 +520,7 @@ void thread_resched(void)
#endif
/* set some optional target debug leds */
target_set_debug_led(0, !thread_is_idle(idle_thread));
target_set_debug_led(0, !thread_is_idle(&idle_threads[cpu]));
/* do the switch */
set_current_thread(newthread);

View File

@@ -170,12 +170,12 @@ void timer_cancel(timer_t *timer)
{
DEBUG_ASSERT(timer->magic == TIMER_MAGIC);
uint cpu = arch_curr_cpu_num();
spin_lock_saved_state_t state;
spin_lock_irqsave(&timer_lock, state);
#if PLATFORM_HAS_DYNAMIC_TIMER
uint cpu = arch_curr_cpu_num();
timer_t *oldhead = list_peek_head_type(&timers[cpu].timer_queue, timer_t, node);
#endif