summaryrefslogtreecommitdiffstats
path: root/sys/sys/runq.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-01-04 08:39:58 +0000
committerjeff <jeff@FreeBSD.org>2007-01-04 08:39:58 +0000
commit78c3275ce133e0cbb8114344ee970ae68e421a9e (patch)
treeca123567dd04417e0c767dc3d0499390b56956b5 /sys/sys/runq.h
parent2f1839e23619a4554b68221db49e2711a4636cd8 (diff)
downloadFreeBSD-src-78c3275ce133e0cbb8114344ee970ae68e421a9e.zip
FreeBSD-src-78c3275ce133e0cbb8114344ee970ae68e421a9e.tar.gz
- 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.
Diffstat (limited to 'sys/sys/runq.h')
-rw-r--r--sys/sys/runq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/runq.h b/sys/sys/runq.h
index 0f3524c..56eec26 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 *);
#endif
OpenPOWER on IntegriCloud