diff options
author | Richard Braun <rbraun@sceen.net> | 2017-01-29 21:33:56 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-01-29 21:33:56 +0100 |
commit | fd4c1bc361429fa17cfeb953ec8323bd62053601 (patch) | |
tree | 5e55ea4284c0ca8956aca00344c6f8f2c4d6d943 /kern/thread.h | |
parent | e2533f68e2a1f7495929a1d799ddd39c714984d8 (diff) |
kern/thread: implement thread_setscheduler
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kern/thread.h b/kern/thread.h index 7258c15a..104e2722 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -233,6 +233,12 @@ void thread_schedule_intr(void); void thread_tick_intr(void); /* + * Set thread scheduling parameters. + */ +void thread_setscheduler(struct thread *thread, unsigned char policy, + unsigned short priority); + +/* * Return a character representation of the state of a thread. */ char thread_state_to_chr(const struct thread *thread); @@ -247,7 +253,7 @@ const char * thread_schedclass_to_str(const struct thread *thread); * * If the scheduling class doesn't use a priority, return 0. */ -unsigned int thread_schedprio(const struct thread *thread); +unsigned short thread_schedprio(const struct thread *thread); static inline struct thread * thread_from_tcb(struct tcb *tcb) |