From cbd4a8df5fb3d69d77451fdb8d177e02e09460d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 4 Jun 2021 14:46:59 +0200 Subject: [PATCH] core: drop bitfields in VTable object The usual: bitfields make sense as a memory-saving measure when we have many objects of a given type. When the object appears at most in a few copies, the overhead of additional code to access bitfields is more than the savings. --- src/core/unit.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/unit.h b/src/core/unit.h index 2db40e51e85..dddb4196137 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -646,7 +646,7 @@ typedef struct UnitVTable { /* Type specific cleanups. */ void (*shutdown)(Manager *m); - /* If this function is set and return false all jobs for units + /* If this function is set and returns false all jobs for units * of this type will immediately fail. */ bool (*supported)(void); @@ -654,25 +654,25 @@ typedef struct UnitVTable { UnitStatusMessageFormats status_message_formats; /* True if transient units of this type are OK */ - bool can_transient:1; + bool can_transient; /* True if cgroup delegation is permissible */ - bool can_delegate:1; + bool can_delegate; /* True if the unit type triggers other units, i.e. can have a UNIT_TRIGGERS dependency */ - bool can_trigger:1; + bool can_trigger; /* True if the unit type knows a failure state, and thus can be source of an OnFailure= dependency */ - bool can_fail:1; + bool can_fail; /* True if units of this type shall be startable only once and then never again */ - bool once_only:1; + bool once_only; /* True if queued jobs of this type should be GC'ed if no other job needs them anymore */ - bool gc_jobs:1; + bool gc_jobs; /* True if systemd-oomd can monitor and act on this unit's recursive children's cgroup(s) */ - bool can_set_managed_oom:1; + bool can_set_managed_oom; } UnitVTable; extern const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX]; -- 2.47.3