path: root/sys/sys/runq.h
diff options
authorJeff Roberson <jeff@FreeBSD.org>2007-01-04 08:39:58 +0000
committerJeff Roberson <jeff@FreeBSD.org>2007-01-04 08:39:58 +0000
commit3fed7d239a695fa3bf77f29c796a4be7fc16c199 (patch)
treeca123567dd04417e0c767dc3d0499390b56956b5 /sys/sys/runq.h
parent783af89c54965ed3209c0bcebda76a30e10c5fe5 (diff)
- Add three new functions to support circular run queues.
- runq_add_pri allows the caller to position the thread at any rqindex regardless of priority. - runq_choose_from() chooses the lowest priority thread starting from a given index. The index is updated with the rqindex of the chosen thread. This routine is used to pick the lowest priority relative to a given index. - runq_remove_idx() updates the index if the run queue that held the removed thread is now empty.
Notes: svn path=/head/; revision=165761
Diffstat (limited to 'sys/sys/runq.h')
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/runq.h b/sys/sys/runq.h
index 0f3524c12a76..56eec26d4707 100644
--- a/sys/sys/runq.h
+++ b/sys/sys/runq.h
@@ -62,10 +62,13 @@ struct runq {
struct rqhead rq_queues[RQ_NQS];
-void runq_add(struct runq *, struct td_sched *, int flags);
+void runq_add(struct runq *, struct td_sched *, int);
+void runq_add_pri(struct runq *, struct td_sched *, int, int);
int runq_check(struct runq *);
struct td_sched *runq_choose(struct runq *);
+struct td_sched *runq_choose_from(struct runq *, int *);
void runq_init(struct runq *);
void runq_remove(struct runq *, struct td_sched *);
+void runq_remove_idx(struct runq *, struct td_sched *, int *);