]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: refactor compare_job_priority()
authorLennart Poettering <lennart@poettering.net>
Fri, 6 Oct 2023 17:04:00 +0000 (19:04 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 7 Oct 2023 13:22:00 +0000 (22:22 +0900)
commita81577961ca3fa90a054f2ccbfc9343f8545b3dc
treebdcdf9f224ff6df8c5187ece91741f8dd85280fb
parent328539c21cbacd817c8495a3bf52b592c764aa96
core: refactor compare_job_priority()

Let's move it out of cgroup.[ch]. The function primarily compares the
priority values for units, hence let's move the core of it into a new
function unit_compare_priority() in unit.[ch], and then make
compare_job_priority() a local wrapper for it in manager.[ch]

Shorten the code a bit while we are at it.
src/core/cgroup.c
src/core/cgroup.h
src/core/manager.c
src/core/unit.c
src/core/unit.h