summaryrefslogtreecommitdiff
path: root/kern/thread.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-03-13 23:17:10 +0100
committerRichard Braun <rbraun@sceen.net>2017-03-13 23:17:10 +0100
commitbd5c89e7aa9edadf3ea39d6cbf7513c4953b41bc (patch)
tree951bc69e84c6e1af7f929900f6d4bafc2f864e42 /kern/thread.c
parentb1aa94d0c7dba4138f651e6b081c1a0055ea8d54 (diff)
kern/thread: reduce the number of real-time priorities to 32
Diffstat (limited to 'kern/thread.c')
-rw-r--r--kern/thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/thread.c b/kern/thread.c
index da61ed68..8ccf628d 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -175,7 +175,7 @@
* Run queue properties for real-time threads.
*/
struct thread_rt_runq {
- unsigned long long bitmap;
+ unsigned int bitmap;
struct list threads[THREAD_SCHED_RT_PRIO_MAX + 1];
};
@@ -757,7 +757,7 @@ thread_sched_rt_get_next(struct thread_runq *runq)
return NULL;
}
- priority = THREAD_SCHED_RT_PRIO_MAX - __builtin_clzll(rt_runq->bitmap);
+ priority = THREAD_SCHED_RT_PRIO_MAX - __builtin_clz(rt_runq->bitmap);
threads = &rt_runq->threads[priority];
assert(!list_empty(threads));
thread = list_first_entry(threads, struct thread, rt_data.node);