From 3e1998280319e8060e797ca39b3b0b1bc766d569 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Tue, 9 Feb 2010 17:48:38 +0100 Subject: Added thread_new syscall --- src/modules/test/main.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/modules/test') 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 +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; } -- cgit v1.2.3