diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-01 12:20:45 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-01 12:20:45 +0200 |
commit | 5cac9acd3aedc8043d4272d93c56805c46ff6214 (patch) | |
tree | ba9eb5ef86f7cf7afd4f7ab02de1d6bb86715632 /src/modules | |
parent | 66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 (diff) | |
download | TCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.tar.gz TCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.zip |
Some cleanup ; relocated the kernel at 0xC0000000
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/test/Makefile | 8 | ||||
-rw-r--r-- | src/modules/test/main.c | 40 |
2 files changed, 0 insertions, 48 deletions
diff --git a/src/modules/test/Makefile b/src/modules/test/Makefile deleted file mode 100644 index 3b9ac14..0000000 --- a/src/modules/test/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -Obj = main.o -Out = test.elf - -include ../../common.make - -CFLAGS += -I ../../include - -LDFLAGS += -T ../../library/link.ld -L ../../library -Map test.map diff --git a/src/modules/test/main.c b/src/modules/test/main.c deleted file mode 100644 index 6c13e5a..0000000 --- a/src/modules/test/main.c +++ /dev/null @@ -1,40 +0,0 @@ -#include <gc/syscall.h> -#include <gc/mem.h> -#include <stdlib.h> - -void thread_cascade(void* d) { - int n = (int)d; - - if (d == 0) { - //printk("{#} 0 cascade element started => end\n"); - printk("{#}0end\t"); - } else { - if (n < 0) { - //printk("{#} - cascade element started\n"); - printk("{#}-\t"); - n = 0 - n; - } else { - //printk("{#} + cascade element started\n"); - printk("{#}+\t"); - } - //printk("{#} FORK + ...\n"); - printk("{#}F+\t"); - thread_new(thread_cascade, (void*)(n - 1)); - //printk("{#} FORK - ...\n"); - printk("{#}F-\t"); - thread_new(thread_cascade, (void*)(1 - n)); - //printk("{#} Thread cascade element finished.\n"); - printk("{#}end\t"); - } -} - -int main() { - printk("Hi world from test module !\n"); - - printk("{1} Creating thread cascade len:5\n"); - thread_new(thread_cascade, (void*)5); - - printk("{1} Thread now sleeping...\n"); - while (1) thread_sleep(1000); - return 0; -} |