Commit bc874d17 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds

[PATCH] um: fix-up schedule_timeout() usage

Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Acked-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8f09f4a2
...@@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size, ...@@ -58,10 +58,8 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
if (filp->f_flags & O_NONBLOCK) if (filp->f_flags & O_NONBLOCK)
return ret ? : -EAGAIN; return ret ? : -EAGAIN;
if(need_resched()){ if(need_resched())
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} }
else return n; else return n;
if (signal_pending (current)) if (signal_pending (current))
......
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