diff options
author | dgilbert <dgilbert@us.ibm.com> | 2011-06-03 12:54:41 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-06-17 12:23:52 -0500 |
commit | 609d6810b8bc92dc979f8bbb8e7e7d7b7b5d9490 (patch) | |
tree | cd517ec2e10a95638e675b037bb24e2d01296ef4 /src/sys/init | |
parent | f64ba52098e248e62b4ddb14c0a027c21066e9e2 (diff) | |
download | talos-hostboot-609d6810b8bc92dc979f8bbb8e7e7d7b7b5d9490.tar.gz talos-hostboot-609d6810b8bc92dc979f8bbb8e7e7d7b7b5d9490.zip |
Initial futex support
Change-Id: I51a4f1117085ce23c7993c1a38e4124596636726
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/141
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/sys/init')
-rw-r--r-- | src/sys/init/init_main.C | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C index aae7f729e..dd83ea131 100644 --- a/src/sys/init/init_main.C +++ b/src/sys/init/init_main.C @@ -4,18 +4,18 @@ #include <sys/syscall.h> #include <sys/task.h> -#include <sys/mutex.h> +#include <sys/sync.h> #include <sys/msg.h> #include <sys/mmio.h> -mutex_t global_mutex; +mutex_t global_mutex = MUTEX_INITIALIZER; /* void init_child(void* unused) { - mutex_lock(global_mutex); + mutex_lock(&global_mutex); printk("Crun: %d on %d\n", task_gettid(), task_getcpuid()); - mutex_unlock(global_mutex); + mutex_unlock(&global_mutex); for (volatile int i = 0 ; i < 100000; i++); task_end(); } @@ -39,8 +39,6 @@ void init_main(void* unused) uint64_t* mmio_addr = (uint64_t*) mmio_map((void*)0x800000000, 1); printk("MMIO Access %lx\n", *mmio_addr); - global_mutex = mutex_create(); - msg_q_t msgq = msg_q_create(); msg_q_register(msgq, "/msg/init"); @@ -53,11 +51,11 @@ void init_main(void* unused) while(1) { - mutex_lock(global_mutex); + mutex_lock(&global_mutex); int t = task_create(&init_child, NULL); printk("Create child %d\n", t); for (volatile int i = 0 ; i < 1000000; i++); - mutex_unlock(global_mutex); + mutex_unlock(&global_mutex); } */ |