From a9982beacf184ccdc4bf1221852c900b0809537d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 7 Aug 2017 11:33:31 -0400 Subject: sched: Introduce sched_wake_tasks() function to wake up tasks Add function to indicate when tasks need to be run. This will allow the scheduler code to know if there are any tasks that need to be processed. Signed-off-by: Kevin O'Connor --- src/pru/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pru') diff --git a/src/pru/main.c b/src/pru/main.c index 3c2a2725..04d440df 100644 --- a/src/pru/main.c +++ b/src/pru/main.c @@ -85,7 +85,10 @@ timer_kick(void) static void _irq_poll(void) { - if (CT_INTC.SECR0 & (1 << IEP_EVENT)) { + uint32_t secr0 = CT_INTC.SECR0; + if (secr0 & (1 << KICK_PRU1_EVENT)) + sched_wake_tasks(); + if (secr0 & (1 << IEP_EVENT)) { CT_IEP.TMR_CMP_STS = 0xff; uint32_t next = timer_dispatch_many(); timer_set(next); @@ -121,7 +124,6 @@ console_task(void) const struct command_parser *cp = SHARED_MEM->next_command; if (!cp) return; - barrier(); if (sched_is_shutdown() && !(cp->flags & HF_IN_SHUTDOWN)) { sched_report_shutdown(); -- cgit v1.2.3-70-g09d2