diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-07 11:33:31 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-08 00:27:28 -0400 |
commit | a9982beacf184ccdc4bf1221852c900b0809537d (patch) | |
tree | 0c7774106b678688361ae8b4ffc346eb51b7b013 /src/pru | |
parent | e9d2ec7c41c60ab74fe2850fb0787af7bb3361f4 (diff) | |
download | kutter-a9982beacf184ccdc4bf1221852c900b0809537d.tar.gz kutter-a9982beacf184ccdc4bf1221852c900b0809537d.tar.xz kutter-a9982beacf184ccdc4bf1221852c900b0809537d.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'src/pru')
-rw-r--r-- | src/pru/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
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(); |