sched/core: Rework and clarify prepare_lock_switch()
authorrodrigosiqueira <rodrigosiqueiramelo@gmail.com>
Fri, 15 Dec 2017 14:06:03 +0000 (12:06 -0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 10 Jan 2018 10:30:27 +0000 (11:30 +0100)
commit31cb1bc0dc94882a588930f4d007b570c481fd17
treec8d0e65b5cb86edc6d78376d12efeaa5bd45132a
parentcb1f34ddccb46f7c1bb61e98b7d44751a20c7e49
sched/core: Rework and clarify prepare_lock_switch()

The prepare_lock_switch() function has an unused parameter, and also the
function name was not descriptive. To improve readability and remove
the extra parameter, do the following changes:

* Move prepare_lock_switch() from kernel/sched/sched.h to
  kernel/sched/core.c, rename it to prepare_task(), and remove the
  unused parameter.

* Split the smp_store_release() out from finish_lock_switch() to a
  function named finish_task.

* Comments ajdustments.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171215140603.gxe5i2y6fg5ojfpp@smtp.gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c
kernel/sched/sched.h