diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-10 03:27:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:37 -0400 |
commit | 75bcc8c5e1de78616b04ef9f317a293a7c1c163c (patch) | |
tree | fabdfd7fbc46baae5638b41648444d805e14eb3c /kernel/compat.c | |
parent | 041e0e3b1970c508dc9a95b7dd9dc86271a7d7ac (diff) |
[PATCH] kernel: fix-up schedule_timeout() usage
Use schedule_timeout_{,un}interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index ddfcaaa86623..102296e21ea8 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -48,8 +48,7 @@ static long compat_nanosleep_restart(struct restart_block *restart) | |||
48 | if (!time_after(expire, now)) | 48 | if (!time_after(expire, now)) |
49 | return 0; | 49 | return 0; |
50 | 50 | ||
51 | current->state = TASK_INTERRUPTIBLE; | 51 | expire = schedule_timeout_interruptible(expire - now); |
52 | expire = schedule_timeout(expire - now); | ||
53 | if (expire == 0) | 52 | if (expire == 0) |
54 | return 0; | 53 | return 0; |
55 | 54 | ||
@@ -82,8 +81,7 @@ asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp, | |||
82 | return -EINVAL; | 81 | return -EINVAL; |
83 | 82 | ||
84 | expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec); | 83 | expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec); |
85 | current->state = TASK_INTERRUPTIBLE; | 84 | expire = schedule_timeout_interruptible(expire); |
86 | expire = schedule_timeout(expire); | ||
87 | if (expire == 0) | 85 | if (expire == 0) |
88 | return 0; | 86 | return 0; |
89 | 87 | ||
@@ -795,8 +793,7 @@ compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese, | |||
795 | recalc_sigpending(); | 793 | recalc_sigpending(); |
796 | spin_unlock_irq(¤t->sighand->siglock); | 794 | spin_unlock_irq(¤t->sighand->siglock); |
797 | 795 | ||
798 | current->state = TASK_INTERRUPTIBLE; | 796 | timeout = schedule_timeout_interruptible(timeout); |
799 | timeout = schedule_timeout(timeout); | ||
800 | 797 | ||
801 | spin_lock_irq(¤t->sighand->siglock); | 798 | spin_lock_irq(¤t->sighand->siglock); |
802 | sig = dequeue_signal(current, &s, &info); | 799 | sig = dequeue_signal(current, &s, &info); |