forked from Minki/linux
[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: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8f09f4a25a
commit
bc874d174b
@ -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)
|
||||
return ret ? : -EAGAIN;
|
||||
|
||||
if(need_resched()){
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule_timeout(1);
|
||||
}
|
||||
if(need_resched())
|
||||
schedule_timeout_interruptible(1);
|
||||
}
|
||||
else return n;
|
||||
if (signal_pending (current))
|
||||
|
Loading…
Reference in New Issue
Block a user