lkml.org 
[lkml]   [2012]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: Removed redundant set_current_state in "yield"
Date
Removed redundant setting current task state to TASK_RUNNING.

During yield process will always remains in TASK_RUNNING state.

Process state of yielded process will not change from TASK_RUNNING, so it does not
make sense setting the process state again to TASK_RUNNING (TASK_RUNNING -> TASK_RUNNING).

Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
---
kernel/sched/core.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4603b9d..c2a357d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4624,7 +4624,6 @@ EXPORT_SYMBOL(__cond_resched_softirq);
*/
void __sched yield(void)
{
- set_current_state(TASK_RUNNING);
sys_sched_yield();
}
EXPORT_SYMBOL(yield);
--
1.7.3.4


\
 
 \ /
  Last update: 2012-04-10 17:45    [W:0.026 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site