kernel: Earliest-deadline-first scheduling policy

Very simple implementation of deadline scheduling.  Works by storing a
single word in each thread containing a deadline, setting it (as a
delta from "now") via a single new API call, and using it as extra
input to the existing thread priority comparison function when
priorities are equal.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-05-15 11:06:25 -07:00 committed by Anas Nashif
commit 4a2e50f6b0
5 changed files with 107 additions and 5 deletions

View file

@ -213,11 +213,7 @@ static inline int _is_prio_lower_or_equal(int prio1, int prio2)
return _is_prio1_lower_than_or_equal_to_prio2(prio1, prio2);
}
static inline int _is_t1_higher_prio_than_t2(struct k_thread *t1,
struct k_thread *t2)
{
return _is_prio1_higher_than_prio2(t1->base.prio, t2->base.prio);
}
int _is_t1_higher_prio_than_t2(struct k_thread *t1, struct k_thread *t2);
static inline int _is_valid_prio(int prio, void *entry_point)
{