patch-2.1.59 linux/kernel/sched.c
Next file: linux/Makefile
Previous file: linux/include/linux/swap.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Fri Oct 17 13:26:57 1997
- Orig file:
v2.1.58/linux/kernel/sched.c
- Orig date:
Wed Sep 24 20:05:48 1997
diff -u --recursive --new-file v2.1.58/linux/kernel/sched.c linux/kernel/sched.c
@@ -104,7 +104,7 @@
static inline void add_to_runqueue(struct task_struct * p)
{
- if (p->counter > current->counter + 3)
+ if (p->policy != SCHED_OTHER || p->counter > current->counter + 3)
need_resched = 1;
nr_running++;
(p->prev_run = init_task.prev_run)->next_run = p;
@@ -649,14 +649,14 @@
}
-static inline void __sleep_on(struct wait_queue **p, int state)
+static void FASTCALL(__sleep_on(struct wait_queue **p, int state));
+static void __sleep_on(struct wait_queue **p, int state)
{
unsigned long flags;
- struct wait_queue wait = { current, NULL };
+ struct wait_queue wait;
- if (!p)
- return;
current->state = state;
+ wait.task = current;
write_lock_irqsave(&waitqueue_lock, flags);
__add_wait_queue(p, &wait);
write_unlock(&waitqueue_lock);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov