From 3ace36ab03f40db05a7876013b7d814a3e5ca171 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Sat, 22 Jan 2022 23:18:22 -0700 Subject: Added SVC call for clean stack --- src/cpu/irq.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/cpu') 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(); } -- cgit v1.2.1