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>
This commit is contained in:
Kevin O'Connor
2017-08-07 11:33:31 -04:00
parent e9d2ec7c41
commit a9982beacf
10 changed files with 74 additions and 10 deletions

View File

@@ -42,8 +42,10 @@ static void
console_pop_input(uint8_t len)
{
uint8_t needcopy = receive_pos - len;
if (needcopy)
if (needcopy) {
memmove(receive_buf, &receive_buf[len], needcopy);
sched_wake_tasks();
}
receive_pos = needcopy;
}