diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-06-17 12:35:39 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-06-24 11:30:00 -0500 |
commit | d85739a1ad9e58339f5a58225da2ba5c7476c68b (patch) | |
tree | ae0acc7d51df7c742e8683ee100558ecb8766ff2 /src/kernel/cpumgr.C | |
parent | 74d2fd5773f91470e17009b5da93f9d4a5cb1d5c (diff) | |
download | talos-hostboot-d85739a1ad9e58339f5a58225da2ba5c7476c68b.tar.gz talos-hostboot-d85739a1ad9e58339f5a58225da2ba5c7476c68b.zip |
Remove heap allocation of xscom mutex.
Since mutexes are simply a uint64 with a static initializer, the xscom mutex
is now a instance variable directly in the cpu object.
Remove unneeded mutex_create function and changed the behavior of
mutex_destroy.
Change-Id: If6e1d1bf0083c32ef9e7502d27678811bdaf7e1e
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/150
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Diffstat (limited to 'src/kernel/cpumgr.C')
-rw-r--r-- | src/kernel/cpumgr.C | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C index 844f8c44a..27417ef0d 100644 --- a/src/kernel/cpumgr.C +++ b/src/kernel/cpumgr.C @@ -8,6 +8,7 @@ #include <util/singleton.H> #include <arch/ppc.H> #include <kernel/timemgr.H> +#include <sys/sync.h> cpu_t* CpuManager::cv_cpus[CpuManager::MAXCPUS] = { NULL }; @@ -58,7 +59,7 @@ void CpuManager::startCPU(ssize_t i) cpu->scheduler_extra = NULL; cpu->kernel_stack = (void*) (((uint64_t)PageManager::allocatePage(4)) + 16320); - cpu->xscom_mutex = NULL; + cpu->xscom_mutex = (mutex_t)MUTEX_INITIALIZER; // Create idle task. cpu->idle_task = TaskManager::createIdleTask(); |