summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-04-13 09:57:18 -0500
committerALWOOD P. WILLIAMS III <iawillia@us.ibm.com>2011-04-14 15:38:37 -0500
commit8fe70e715d58a8b066c19160e196821742b91bc8 (patch)
tree046df8612b4e10c0f7c8d2cbe8ea8542ed6c04a7
parentc0776eaa0548fc3ddec21e3113539198fa1cf875 (diff)
downloadtalos-hostboot-8fe70e715d58a8b066c19160e196821742b91bc8.tar.gz
talos-hostboot-8fe70e715d58a8b066c19160e196821742b91bc8.zip
Add per CPU sleep queues.
Change-Id: If4e9137c860d177a9bccf8f2fc27808a84cdb4db Reviewed-on: http://localhost:8080/gerrit/1 Tested-by: Jenkins Server Reviewed-by: ALWOOD P. WILLIAMS III <iawillia@us.ibm.com>
-rw-r--r--src/include/kernel/timemgr.H8
-rw-r--r--src/kernel/timemgr.C4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/include/kernel/timemgr.H b/src/include/kernel/timemgr.H
index acd4361c2..158825da6 100644
--- a/src/include/kernel/timemgr.H
+++ b/src/include/kernel/timemgr.H
@@ -2,6 +2,7 @@
#define __KERNEL_TIMEMGR_H
#include <kernel/types.h>
+#include <kernel/cpu.H>
#include <arch/ppc.H>
#include <util/locked/pqueue.H>
@@ -42,8 +43,7 @@ class TimeManager
static void checkReleaseTasks(Scheduler* s);
protected:
- TimeManager() :
- iv_taskList() {};
+ TimeManager() {};
~TimeManager() {};
private:
@@ -51,8 +51,8 @@ class TimeManager
void _delayTask(task_t* t, uint64_t i_sec, uint64_t i_nsec);
void _checkReleaseTasks(Scheduler* s);
- Util::Locked::PQueue<_TimeManager_Delay_t, uint64_t,
- true, Spinlock> iv_taskList;
+ Util::Locked::PQueue<_TimeManager_Delay_t, uint64_t>
+ iv_taskList[KERNEL_MAX_SUPPORTED_CPUS];
static uint64_t iv_timebaseFreq;
};
diff --git a/src/kernel/timemgr.C b/src/kernel/timemgr.C
index 3871e1ceb..e6246c965 100644
--- a/src/kernel/timemgr.C
+++ b/src/kernel/timemgr.C
@@ -39,7 +39,7 @@ void TimeManager::_delayTask(task_t* t, uint64_t i_sec, uint64_t i_nsec)
this->convertSecToTicks(i_sec, i_nsec);
node->task = t;
- iv_taskList.insert(node);
+ iv_taskList[getPIR()].insert(node);
}
void TimeManager::checkReleaseTasks(Scheduler* s)
@@ -52,7 +52,7 @@ void TimeManager::_checkReleaseTasks(Scheduler* s)
uint64_t l_currentTime = getCurrentTimeBase();
_TimeManager_Delay_t* node = NULL;
- while(NULL != (node = iv_taskList.remove_if(l_currentTime)))
+ while(NULL != (node = iv_taskList[getPIR()].remove_if(l_currentTime)))
{
s->addTask(node->task);
delete node;
OpenPOWER on IntegriCloud