summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-09 16:43:03 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-10 14:43:10 +0100
commitec08f27069161565c52d218dcf464f55a0e15c23 (patch)
tree85333e75b09893cbdf24b006d438a35c5fa54791 /src/core/manager.h
parent61b315de9b9a0688d63142947d0e5ce76e6bc7ac (diff)
downloadsystemd-ec08f27069161565c52d218dcf464f55a0e15c23.tar.gz
core: drop bitfields in Manager object
Every bitfield may make the object a little smaller, but requires additional code when accessing the field. So it only makes sense in objects that are created in many many copies. The Manager is pretty much a singleton. -rwxrwxr-x 1 zbyszek zbyszek 4443840 Feb 9 16:14 build/systemd -rwxrwxr-x 1 zbyszek zbyszek 4442552 Feb 9 16:42 build/systemd We save 1288 bytes of code by "wasting" a few bytes on storage. (The speed advantages are probably more important, but harder to measure…)
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 19df889dd8..e56d297908 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -311,25 +311,25 @@ struct Manager {
/* The stat() data the last time we saw /etc/localtime */
usec_t etc_localtime_mtime;
- bool etc_localtime_accessible:1;
+ bool etc_localtime_accessible;
- ManagerObjective objective:5;
+ ManagerObjective objective;
/* Flags */
- bool dispatching_load_queue:1;
+ bool dispatching_load_queue;
- bool taint_usr:1;
+ bool taint_usr;
/* Have we already sent out the READY=1 notification? */
- bool ready_sent:1;
+ bool ready_sent;
/* Have we already printed the taint line if necessary? */
- bool taint_logged:1;
+ bool taint_logged;
/* Have we ever changed the "kernel.pid_max" sysctl? */
- bool sysctl_pid_max_changed:1;
+ bool sysctl_pid_max_changed;
- ManagerTestRunFlags test_run_flags:8;
+ ManagerTestRunFlags test_run_flags;
/* If non-zero, exit with the following value when the systemd
* process terminate. Useful for containers: systemd-nspawn could get
@@ -366,8 +366,8 @@ struct Manager {
int original_log_level;
LogTarget original_log_target;
- bool log_level_overridden:1;
- bool log_target_overridden:1;
+ bool log_level_overridden;
+ bool log_target_overridden;
struct rlimit *rlimit[_RLIMIT_MAX];