On 04.08.2005 [10:08:10 -0700], Andrew Morton wrote:
> Roman Zippel <[email protected]> wrote:
> >
> > Andrew, please drop this patch.
>
> Well I was sitting on them with the intention of taking a look later and
> trying to work out what the heck you two have been going on about.
I appreciate that... Good luck figuring out this mess...
> But maybe dropping them means that we'll later get a clear and concise
> description of the problem and its solution, so I'll do that.
I will try and formulate this as well as I can today or tomorrow.
> (This was supposed to be just a simple "consolidate
> set_current_state+schedule_timeout into a single function call" patch.
> What happened?)
Here's that patch. What happened? I did, to be honest. Trying to fix too
many things at once.
Thanks,
Nish
Description: Add schedule_timeout_{,un}intr() interfaces so that
schedule_timeout() callers don't have to worry about forgetting to add
the set_current_state() call beforehand.
Signed-off-by: Nishanth Aravamudan <[email protected]>
---
include/linux/sched.h | 2 ++
kernel/timer.c | 14 ++++++++++++++
2 files changed, 16 insertions(+)
diff -urpN 2.6.13-rc5/include/linux/sched.h 2.6.13-rc5-dev/include/linux/sched.h
--- 2.6.13-rc5/include/linux/sched.h 2005-08-04 11:46:06.000000000 -0700
+++ 2.6.13-rc5-dev/include/linux/sched.h 2005-08-04 11:53:20.000000000 -0700
@@ -183,6 +183,8 @@ extern int in_sched_functions(unsigned l
#define MAX_SCHEDULE_TIMEOUT LONG_MAX
extern signed long FASTCALL(schedule_timeout(signed long timeout));
+extern signed long schedule_timeout_intr(signed long timeout);
+extern signed long schedule_timeout_unintr(signed long timeout);
asmlinkage void schedule(void);
struct namespace;
diff -urpN 2.6.13-rc5/kernel/timer.c 2.6.13-rc5-dev/kernel/timer.c
--- 2.6.13-rc5/kernel/timer.c 2005-08-04 11:46:06.000000000 -0700
+++ 2.6.13-rc5-dev/kernel/timer.c 2005-08-04 11:52:06.000000000 -0700
@@ -1153,6 +1153,20 @@ fastcall signed long __sched schedule_ti
EXPORT_SYMBOL(schedule_timeout);
+signed long __sched schedule_timeout_intr(signed long timeout)
+{
+ set_current_state(TASK_INTERRUPTIBLE);
+ return schedule_timeout(timeout);
+}
+EXPORT_SYMBOL(schedule_timeout_intr);
+
+signed long __sched schedule_timeout_unintr(signed long timeout)
+{
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ return schedule_timeout(timeout);
+}
+EXPORT_SYMBOL(schedule_timeout_unintr);
+
/* Thread ID - the internal kernel "pid" */
asmlinkage long sys_gettid(void)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces
- Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces
- Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces
- Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces
- Re: [PATCH] Add schedule_timeout_{interruptible,uninterruptible}{,_msecs}() interfaces
- [UPDATE PATCH] Add schedule_timeout_{intr,unintr}{,_msecs}() interfaces
- Re: [UPDATE PATCH] Add schedule_timeout_{intr,unintr}{,_msecs}() interfaces
- [PATCH] push rounding up of relative request to schedule_timeout()
- Re: [PATCH] push rounding up of relative request to schedule_timeout()
- Re: [PATCH] push rounding up of relative request to schedule_timeout()
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|