diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2010-06-07 16:39:45 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2010-06-07 16:39:45 -0500 |
commit | 9a4698af6ee4c095a97b8800d2d5f0a4bb282b15 (patch) | |
tree | 9f5241ee1f91d21c8043b359d7bfaeb309ecd5b8 /src/sys/init | |
parent | aa1db69f1de27bba8ee5e128f717557780f21e0d (diff) | |
download | talos-hostboot-9a4698af6ee4c095a97b8800d2d5f0a4bb282b15.tar.gz talos-hostboot-9a4698af6ee4c095a97b8800d2d5f0a4bb282b15.zip |
Add task control syscalls.
Diffstat (limited to 'src/sys/init')
-rw-r--r-- | src/sys/init/init_main.C | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/sys/init/init_main.C b/src/sys/init/init_main.C index e2447bc3f..8be5ae6c3 100644 --- a/src/sys/init/init_main.C +++ b/src/sys/init/init_main.C @@ -1,5 +1,12 @@ #include <kernel/console.H> // TODO : Remove this. -#include <sys/syscall.h> // TODO : Remove this. + +#include <sys/task.h> + +void init_child(void* unused) +{ + printk("Here I am %d\n", task_gettid()); + task_end(); +} void init_main(void* unused) { @@ -7,7 +14,8 @@ void init_main(void* unused) while(1) { - _syscall0(Systemcalls::TASK_YIELD); - for (volatile int i = 0 ; i < 100000; i++); + int t = task_create(&init_child, NULL); + printk("Created child %d\n", t); + for (volatile int i = 0 ; i < 10000000; i++); } } |