X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=kern%2Fproc_test.c;h=b7e385a5973d3dd9d267b8d9465ae542a105c2a1;hb=HEAD;hp=4c2f3126d76feea80fea461fa709c70defb6d97b;hpb=3d3ba5cae20af3f5d1a75d7a3d727a2199160137;p=bertos.git diff --git a/kern/proc_test.c b/kern/proc_test.c deleted file mode 100644 index 4c2f3126..00000000 --- a/kern/proc_test.c +++ /dev/null @@ -1,58 +0,0 @@ - -#include -#include - -/** - * Proc scheduling test subthread 1 - */ -static void NORETURN proc_test_thread1(void) -{ - for (;;) - { - kputs(">task 1\n"); - timer_delay(50); - proc_switch(); - } -} - -/** - * Proc scheduling test subthread 2 - */ -static void NORETURN proc_test_thread2(void) -{ - for (;;) - { - kputs(">task 2\n"); - timer_delay(75); - proc_switch(); - } -} - -static cpustack_t proc_test_stack1[CONFIG_PROC_DEFSTACKSIZE / sizeof(cpustack_t)]; -static cpustack_t proc_test_stack2[CONFIG_PROC_DEFSTACKSIZE / sizeof(cpustack_t)]; - -/** - * Proc scheduling test - */ -void NORETURN proc_test(void) -{ - proc_new(proc_test_thread1, NULL, sizeof(proc_test_stack1), proc_test_stack1); - proc_new(proc_test_thread2, NULL, sizeof(proc_test_stack2), proc_test_stack2); - kputs("Created tasks\n"); - - kputs("stack1:\n"); -// #warning FIXME - kdump(proc_test_stack1+sizeof(proc_test_stack1)-64, 64); - kputs("stack2:\n"); -// #warning FIXME - kdump(proc_test_stack2+sizeof(proc_test_stack1)-64, 64); - - for (;;) - { - kputs(">main task\n"); - timer_delay(93); - proc_switch(); - } - - ASSERT(false); -}