aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/irixsig.c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-10 00:27:27 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 10:06:37 -0700
commit310b587e011ce02328c8e4c29eccd9f14d9007c5 (patch)
treeffc32e0262a68415d2b89d39d4ac6a35817f9875 /arch/mips/kernel/irixsig.c
parent[PATCH] i386: fix-up schedule_timeout() usage (diff)
downloadlinux-dev-310b587e011ce02328c8e4c29eccd9f14d9007c5.tar.xz
linux-dev-310b587e011ce02328c8e4c29eccd9f14d9007c5.zip
[PATCH] mips: fix-up schedule_timeout() usage
Use schedule_timeout_interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also, replace custom timespectojiffies() function with globally availabe timespec_to_jiffies(). Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/mips/kernel/irixsig.c')
-rw-r--r--arch/mips/kernel/irixsig.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index 4c114ae21793..eff89322ba50 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -440,18 +440,6 @@ struct irix5_siginfo {
} stuff;
};
-static inline unsigned long timespectojiffies(struct timespec *value)
-{
- unsigned long sec = (unsigned) value->tv_sec;
- long nsec = value->tv_nsec;
-
- if (sec > (LONG_MAX / HZ))
- return LONG_MAX;
- nsec += 1000000000L / HZ - 1;
- nsec /= 1000000000L / HZ;
- return HZ * sec + nsec;
-}
-
asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
struct timespec *tp)
{
@@ -489,14 +477,13 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
error = -EINVAL;
goto out;
}
- expire = timespectojiffies(tp)+(tp->tv_sec||tp->tv_nsec);
+ expire = timespec_to_jiffies(tp) + (tp->tv_sec||tp->tv_nsec);
}
while(1) {
long tmp = 0;
- current->state = TASK_INTERRUPTIBLE;
- expire = schedule_timeout(expire);
+ expire = schedule_timeout_interruptible(expire);
for (i=0; i<=4; i++)
tmp |= (current->pending.signal.sig[i] & kset.sig[i]);