Commit 232dbd9f authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/sfr
parents e2f14013 f2478c00
VERSION = 2
PATCHLEVEL = 5
SUBLEVEL = 59
SUBLEVEL = 60
EXTRAVERSION =
# *DOCUMENTATION*
......
......@@ -110,7 +110,7 @@ config QDIO
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called qdio.o. If you want to compile it as a
The module will be called qdio. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
If unsure, say Y.
......@@ -210,7 +210,7 @@ config BINFMT_ELF
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
will be called binfmt_elf.o. Saying M or N here is dangerous because
will be called binfmt_elf. Saying M or N here is dangerous because
some crucial programs on your system might be in ELF format.
config BINFMT_MISC
......@@ -235,7 +235,7 @@ config BINFMT_MISC
use this part of the kernel.
You may say M here for module support and later load the module when
you have use for it; the module is called binfmt_misc.o. If you
you have use for it; the module is called binfmt_misc. If you
don't know what to answer at this point, say Y.
config PROCESS_DEBUG
......
......@@ -124,7 +124,7 @@ config QDIO
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called qdio.o. If you want to compile it as a
The module will be called qdio. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
If unsure, say Y.
......@@ -224,7 +224,7 @@ config BINFMT_ELF
If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read <file:Documentation/modules.txt>. The module
will be called binfmt_elf.o. Saying M or N here is dangerous because
will be called binfmt_elf. Saying M or N here is dangerous because
some crucial programs on your system might be in ELF format.
config BINFMT_MISC
......@@ -249,7 +249,7 @@ config BINFMT_MISC
use this part of the kernel.
You may say M here for module support and later load the module when
you have use for it; the module is called binfmt_misc.o. If you
you have use for it; the module is called binfmt_misc. If you
don't know what to answer at this point, say Y.
config PROCESS_DEBUG
......
......@@ -311,7 +311,7 @@ config SC520_WDT
amount of time.
You can compile this driver directly into the kernel, or use
it as a module. The module will be called sc520_wdt.o.
it as a module. The module will be called sc520_wdt.
config ALIM7101_WDT
tristate "ALi M7101 PMU Computer Watchdog"
......@@ -322,7 +322,7 @@ config ALIM7101_WDT
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module is called alim7101_wdt.o. If you want to compile it as a
The module is called alim7101_wdt. If you want to compile it as a
module, say M here and read Documentation/modules.txt. Most
people will say N.
......@@ -337,7 +337,7 @@ config SC1200_WDT
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module is called sc1200wdt.o. If you want to compile it as a
The module is called sc1200wdt. If you want to compile it as a
module, say M here and read Documentation/modules.txt. Most
people will say N.
......
......@@ -152,7 +152,7 @@ config ITE_I2C_ALGO
This support is also available as a module. If you want to compile
it as a module, say M here and read Documentation/modules.txt.
The module will be called i2c-algo-ite.o.
The module will be called i2c-algo-ite.
config ITE_I2C_ADAP
tristate "ITE I2C Adapter"
......@@ -164,7 +164,7 @@ config ITE_I2C_ADAP
This support is also available as a module. If you want to compile
it as a module, say M here and read Documentation/modules.txt.
The module will be called i2c-adap-ite.o.
The module will be called i2c-adap-ite.
config I2C_ALGO8XX
tristate "MPC8xx CPM I2C interface"
......
......@@ -516,6 +516,7 @@ extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
extern void do_timer(struct pt_regs *);
extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state));
extern int FASTCALL(wake_up_process(struct task_struct * tsk));
extern void FASTCALL(wake_up_forked_process(struct task_struct * tsk));
extern void FASTCALL(sched_exit(task_t * p));
......
......@@ -438,6 +438,7 @@ void kick_if_running(task_t * p)
/***
* try_to_wake_up - wake up a thread
* @p: the to-be-woken-up thread
* @state: the mask of task states that can be woken
* @sync: do a synchronous wakeup?
*
* Put it on the run-queue if it's not already there. The "current"
......@@ -448,7 +449,7 @@ void kick_if_running(task_t * p)
*
* returns failure only if the task is already active.
*/
static int try_to_wake_up(task_t * p, int sync)
static int try_to_wake_up(task_t * p, unsigned int state, int sync)
{
unsigned long flags;
int success = 0;
......@@ -458,6 +459,7 @@ static int try_to_wake_up(task_t * p, int sync)
repeat_lock_task:
rq = task_rq_lock(p, &flags);
old_state = p->state;
if (old_state & state) {
if (!p->array) {
/*
* Fast-migrate the task if it's not running or runnable
......@@ -480,6 +482,7 @@ static int try_to_wake_up(task_t * p, int sync)
success = 1;
}
p->state = TASK_RUNNING;
}
task_rq_unlock(rq, &flags);
return success;
......@@ -487,7 +490,12 @@ static int try_to_wake_up(task_t * p, int sync)
int wake_up_process(task_t * p)
{
return try_to_wake_up(p, 0);
return try_to_wake_up(p, TASK_STOPPED | TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0);
}
int wake_up_state(task_t *p, unsigned int state)
{
return try_to_wake_up(p, state, 0);
}
/*
......@@ -1263,7 +1271,7 @@ asmlinkage void preempt_schedule(void)
int default_wake_function(wait_queue_t *curr, unsigned mode, int sync)
{
task_t *p = curr->task;
return ((p->state & mode) && try_to_wake_up(p, sync));
return try_to_wake_up(p, mode, sync);
}
/*
......@@ -2418,7 +2426,7 @@ void __init sched_init(void)
rq->curr = current;
rq->idle = current;
set_task_cpu(current, smp_processor_id());
wake_up_process(current);
wake_up_forked_process(current);
init_timers();
......
......@@ -620,13 +620,8 @@ static void handle_stop_signal(int sig, struct task_struct *p)
t = p;
do {
rm_from_queue(SIG_KERNEL_STOP_MASK, &t->pending);
/*
* This wakeup is only need if in TASK_STOPPED,
* but there can be SMP races with testing for that.
* In the normal SIGCONT case, all will be stopped.
* A spuriously sent SIGCONT will interrupt all running
* threads to check signals even if it's ignored.
*
* If there is a handler for SIGCONT, we must make
* sure that no thread returns to user mode before
* we post the signal, in case it was the only
......@@ -636,12 +631,14 @@ static void handle_stop_signal(int sig, struct task_struct *p)
* flag set, the thread will pause and acquire the
* siglock that we hold now and until we've queued
* the pending signal.
*
* Wake up the stopped thread _after_ setting
* TIF_SIGPENDING
*/
if (!(t->flags & PF_EXITING)) {
if (!sigismember(&t->blocked, SIGCONT))
set_tsk_thread_flag(t, TIF_SIGPENDING);
wake_up_process(t);
}
wake_up_state(t, TASK_STOPPED);
t = next_thread(t);
} while (t != p);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment