]> git.ipfire.org Git - thirdparty/linux.git/commit
sched: Move attach_one_task and attach_task helpers to sched.h
authorJohn Stultz <jstultz@google.com>
Tue, 24 Mar 2026 19:13:24 +0000 (19:13 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 3 Apr 2026 12:23:40 +0000 (14:23 +0200)
commitdec9554dc036183c715d02e9cfe48986d453427a
tree47bedeb1059e0fba8072991e98a44cae346def10
parent48fda62de67a1e88fc8bada12caf0fc9b45116df
sched: Move attach_one_task and attach_task helpers to sched.h

The fair scheduler locally introduced attach_one_task() and
attach_task() helpers, but these could be generically useful so
move this code to sched.h so we can use them elsewhere.

One minor tweak made to utilize guard(rq_lock)(rq) to simplifiy
the function.

Suggested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260324191337.1841376-10-jstultz@google.com
kernel/sched/fair.c
kernel/sched/sched.h