From d74d8eca144a79a6f7c9f6dfb3a88053c521a515 Mon Sep 17 00:00:00 2001 From: jethead71 Date: Sun, 18 Apr 2010 10:03:25 +0000 Subject: [PATCH] Fix red from r25666 (forgot to use macro to not use core variable on single core), update a comment and remove core check for setting THREAD_SWITCH upon wakeup which is irrelevant to the idea behind the change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25667 a1c6a512-1295-4272-9138-f99709370657 --- firmware/thread.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/thread.c b/firmware/thread.c index 1e20181c7..13d568eaf 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -2234,12 +2234,12 @@ unsigned int wakeup_thread(struct thread_entry **list) } if (current != NULL && - IF_COP( thread->core == current->core && ) - find_first_set_bit(cores[current->core].rtr.mask) < current->priority) + find_first_set_bit(cores[IF_COP_CORE(current->core)].rtr.mask) + < current->priority) { - /* Woken thread is higher priority and exists on the same CPU core; - * recommend a task switch. Knowing if this is an interrupt call - * would be helpful here. */ + /* There is a thread ready to run of higher or same priority on + * the same core as the current one; recommend a task switch. + * Knowing if this is an interrupt call would be helpful here. */ result |= THREAD_SWITCH; } #endif /* HAVE_PRIORITY_SCHEDULING */ -- 2.11.4.GIT