diff options
author | Christian Cunningham <cc@localhost> | 2022-01-22 23:18:22 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-01-22 23:18:22 -0700 |
commit | 3ace36ab03f40db05a7876013b7d814a3e5ca171 (patch) | |
tree | a3961e767c4c6672134bac263e72c4047b45fef1 /src/cpu/irq.c | |
parent | 9c0cb4e1f7df02f24751833b384963917bbf2360 (diff) |
Added SVC call for clean stack
Diffstat (limited to 'src/cpu/irq.c')
-rw-r--r-- | src/cpu/irq.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/cpu/irq.c b/src/cpu/irq.c index 0ddba2b..729a58d 100644 --- a/src/cpu/irq.c +++ b/src/cpu/irq.c @@ -219,11 +219,16 @@ unsigned long c_fiq_handler(void) } } else if (source & (1 << 3)) { c_timer(); - if (counter++ >= 0x10) { + counter++; + if (counter % 0x60 == 0) { + add_thread(localtest, 0, 0); + } else if (counter % 0x6000 == 0) { counter = 0; + } + if (counter % 0x10 == 0) { //uart_scheduler(); return 1; - } + } return 0; } return 0; @@ -231,13 +236,4 @@ unsigned long c_fiq_handler(void) void localtest(void) { - //struct Thread* t = scheduler.rthread_ll->data; - uart_string("Running IRQ Task...\n"); - //uart_scheduler(); - //uart_10(t->data.pid); - //uart_char('\n'); - uart_string("Finished!\n"); - //uart_10(t->data.pid); - //uart_char('\n'); - //sched_info(); } |