1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 typedef struct Scope Scope
;
10 typedef enum ScopeResult
{
12 SCOPE_FAILURE_RESOURCES
,
13 SCOPE_FAILURE_TIMEOUT
,
14 SCOPE_FAILURE_OOM_KILL
,
16 _SCOPE_RESULT_INVALID
= -EINVAL
,
22 CGroupContext cgroup_context
;
23 KillContext kill_context
;
25 ScopeState state
, deserialized_state
;
28 usec_t runtime_max_usec
;
29 usec_t runtime_rand_extra_usec
;
30 usec_t timeout_stop_usec
;
33 sd_bus_track
*controller_track
;
37 sd_event_source
*timer_event_source
;
45 extern const UnitVTable scope_vtable
;
47 int scope_abandon(Scope
*s
);
49 const char* scope_result_to_string(ScopeResult i
) _const_
;
50 ScopeResult
scope_result_from_string(const char *s
) _pure_
;
52 DEFINE_CAST(SCOPE
, Scope
);