core: port unit_main_pid() + unit_control_pid() to PidRef and drop unit_kill_common()
This ports over unit_main_pid() + unit_control_pid() to return PidRef* pointers (which also means the underlying UnitVTable function pointers are changed accordingly). This then uses te functions to simplify the unit_kill() call, by avoiding the kill() vtable indirection and instead just suing unit_main_pid() and unit_control_pid() directly.
This commit is contained in:
@@ -247,10 +247,6 @@ static int slice_stop(Unit *u) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int slice_kill(Unit *u, KillWho who, int signo, int code, int value, sd_bus_error *error) {
|
||||
return unit_kill_common(u, who, signo, code, value, -1, -1, error);
|
||||
}
|
||||
|
||||
static int slice_serialize(Unit *u, FILE *f, FDSet *fds) {
|
||||
Slice *s = SLICE(u);
|
||||
|
||||
@@ -436,8 +432,6 @@ const UnitVTable slice_vtable = {
|
||||
.start = slice_start,
|
||||
.stop = slice_stop,
|
||||
|
||||
.kill = slice_kill,
|
||||
|
||||
.freeze = slice_freeze,
|
||||
.thaw = slice_thaw,
|
||||
.can_freeze = slice_can_freeze,
|
||||
|
||||
Reference in New Issue
Block a user