diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-04-25 00:15:04 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-04-25 00:15:04 +0000 |
commit | 7b9581a13148957842ab53e2b28bf0a663a48980 (patch) | |
tree | 04db80bcc15ccb36c50d6e368c5846ec65bcd4f0 /firmware/test/kernel/main.c | |
parent | 99406a6635f91f5fc716cd0ca28e8364f7a97061 (diff) |
Not yet working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@220 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/test/kernel/main.c')
-rw-r--r-- | firmware/test/kernel/main.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/firmware/test/kernel/main.c b/firmware/test/kernel/main.c index 6ce99c8065..b52ecff21d 100644 --- a/firmware/test/kernel/main.c +++ b/firmware/test/kernel/main.c @@ -17,6 +17,7 @@ * ****************************************************************************/ #include "thread.h" +#include "kernel.h" #include "sh7034.h" #include "debug.h" @@ -30,11 +31,11 @@ void t2(void); int main(void) { - char buf[40]; - char str[32]; - int i=0; + char buf[40]; + char str[32]; + int i=0; - /* Clear it all! */ + /* Clear it all! */ SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER); /* This enables the serial Rx interrupt, to be able to exit into the @@ -46,31 +47,31 @@ int main(void) debugf("OK. Let's go\n"); tick_start(40); - + create_thread(t1, s1, 1024); create_thread(t2, s2, 1024); while(1) { - debugf("t0\n"); - switch_thread(); + debugf("t0\n"); + sleep(100); } } void t1(void) { - while(1) - { - debugf("t1\n"); - switch_thread(); - } + while(1) + { + debugf("t1\n"); + sleep(200); + } } void t2(void) { - while(1) - { - debugf("t2\n"); - switch_thread(); - } + while(1) + { + debugf("t2\n"); + sleep(300); + } } |