diff options
author | Christian Cunningham <cc@localhost> | 2022-01-21 11:37:49 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-21 11:37:49 -0700 |
commit | 00660fb9143daf7fa04647bccd6047b9bf0f5e48 (patch) | |
tree | 804fd0acb47dbd6b6f7120653c9ab58d5498328c /src/sys/core.c | |
parent | 0ff3f3c6f0773c7023b86bc829ff607e934bc2dc (diff) |
Scheduler Rewrite Start
Diffstat (limited to 'src/sys/core.c')
-rw-r--r-- | src/sys/core.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/sys/core.c b/src/sys/core.c index cb9b765..1329c12 100644 --- a/src/sys/core.c +++ b/src/sys/core.c @@ -71,43 +71,43 @@ void sysinit(void) void testlocal1(void) { - unsigned long a = 5; - struct Thread* t = scheduler.rthread_ll->data; - uart_string("vRan Thread "); - uart_10(t->data.pid); - uart_string(" Pri. "); - uart_10(t->data.priority); - uart_string(" ...\n"); - add_thread(testlocal, 0); - schedule(); - a += t->data.pid; - uart_10(a); - uart_string(" Done!\n"); + //unsigned long a = 5; + //struct Thread* t = scheduler.rthread_ll->data; + //uart_string("vRan Thread "); + //uart_10(t->data.pid); + //uart_string(" Pri. "); + //uart_10(t->data.priority); + //uart_string(" ...\n"); + //add_thread(testlocal, 0); + //schedule(); + //a += t->data.pid; + //uart_10(a); + //uart_string(" Done!\n"); } void testlocal(void) { - struct Thread* t = scheduler.rthread_ll->data; - uart_string("Ran Thread "); - uart_10(t->data.pid); - uart_string(" Pri. "); - uart_10(t->data.priority); - uart_string(" ...\n"); - //delay(0x80000000); - if (t->data.pid == 5) { - add_thread(testlocal1, 1); - schedule(); - } - if (t->data.pid == 3) { - // Example - /* - while (uart_tx_full) { - t->data.status = THREAD_WAITING; - schedule(); - } // Will wait until uart_tx is not full - */ - } - uart_string("Done! "); - uart_10(t->data.pid); - uart_char('\n'); + //struct Thread* t = scheduler.rthread_ll->data; + //uart_string("Ran Thread "); + //uart_10(t->data.pid); + //uart_string(" Pri. "); + //uart_10(t->data.priority); + //uart_string(" ...\n"); + ////delay(0x80000000); + //if (t->data.pid == 5) { + // add_thread(testlocal1, 1); + // schedule(); + //} + //if (t->data.pid == 3) { + // // Example + // /* + // while (uart_tx_full) { + // t->data.status = THREAD_WAITING; + // schedule(); + // } // Will wait until uart_tx is not full + // */ + //} + //uart_string("Done! "); + //uart_10(t->data.pid); + //uart_char('\n'); } |