summaryrefslogtreecommitdiff
path: root/src/modules/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/test')
-rw-r--r--src/modules/test/main.c19
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;
}