diff options
author | Andrew Morton <akpm@osdl.org> | 2004-05-09 23:28:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-09 23:28:10 -0700 |
commit | 3c6f29aac8aba4db3b4716003ab86acc466e3951 (patch) | |
tree | 299d582d0f56e70e2d9e879a289fd521dda41781 /kernel | |
parent | 78650e1b9aa58135694a64a1f650596c6ecce460 (diff) | |
download | history-3c6f29aac8aba4db3b4716003ab86acc466e3951.tar.gz |
[PATCH] sched: add enqueeu_task_head()
From: Ingo Molnar <mingo@elte.hu>
Helper function for later patches
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6ee2df67e6e023..7bf07d5942e06a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -331,6 +331,21 @@ static void enqueue_task(struct task_struct *p, prio_array_t *array) p->array = array; } +#ifdef CONFIG_SMP +/* + * Used by the migration code - we pull tasks from the head of the + * remote queue so we want these tasks to show up at the head of the + * local queue: + */ +static inline void enqueue_task_head(struct task_struct *p, prio_array_t *array) +{ + list_add(&p->run_list, array->queue + p->prio); + __set_bit(p->prio, array->bitmap); + array->nr_active++; + p->array = array; +} +#endif + /* * effective_prio - return the priority that is based on the static * priority but is modified by bonuses/penalties. |