]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
pid1: include the source unit in UnitRef
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 13 Feb 2018 12:12:43 +0000 (13:12 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Feb 2018 12:27:06 +0000 (13:27 +0100)
commit7f7d01ed5804afef220ebdb29f22d8177d0d3a5c
treea5c250f7efc1ddbf15227463ba170a4f9a2dca88
parentf2f725e5cc950e84ebfd09bd64bc01c0ebdb6734
pid1: include the source unit in UnitRef

No functional change.

The source unit manages the reference. It allocates the UnitRef structure and
registers it in the target unit, and then the reference must be destroyed
before the source unit is destroyed. Thus, is should be OK to include the
pointer to the source unit, it should be live as long as the reference exists.

v2:
- rename refs to refs_by_target
src/core/load-fragment.c
src/core/service.c
src/core/slice.c
src/core/socket.c
src/core/unit.c
src/core/unit.h