diff options
author | Alexis211 <alexis211@gmail.com> | 2010-02-09 17:48:38 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-02-09 17:48:38 +0100 |
commit | 3e1998280319e8060e797ca39b3b0b1bc766d569 (patch) | |
tree | 045c5a3e7d12a499a8f107e1223ae6880600a8c1 /src/modules/test | |
parent | 4886faa3dce410543eda2139221e03959e73a747 (diff) | |
download | TCE-3e1998280319e8060e797ca39b3b0b1bc766d569.tar.gz TCE-3e1998280319e8060e797ca39b3b0b1bc766d569.zip |
Added thread_new syscall
Diffstat (limited to 'src/modules/test')
-rw-r--r-- | src/modules/test/main.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/modules/test/main.c b/src/modules/test/main.c index fbb6eb8..01ab836 100644 --- a/src/modules/test/main.c +++ b/src/modules/test/main.c @@ -1,12 +1,19 @@ #include <grapes/syscall.h> +void thread2(void* d) { + while (1) { + thread_sleep(1400); + printk("$"); + } +} + int main() { printk("[module:test] Hi world !\n"); - thread_sleep(2000); - printk("[module:test] 2sec later...\n"); - printk("[module:test] Performing illegal read in kernel space...\n"); - int *a = (int*)0xE0000004; - if (*a == 0) printk("is null...\n"); - printk("[module:test] HAHA !!!!\n"); + printk("[module:test] Creating new thread...\n"); + thread_new(thread2, 0); + while (1) { + thread_sleep(2000); + printk("."); + } return 0; } |