diff --git a/src/libsystemd/sd-event/event-source.h b/src/libsystemd/sd-event/event-source.h index 385779df2c..a7c1807cd4 100644 --- a/src/libsystemd/sd-event/event-source.h +++ b/src/libsystemd/sd-event/event-source.h @@ -106,11 +106,16 @@ struct sd_event_source { pid_t pid; int options; int pidfd; - bool registered:1; /* whether the pidfd is registered in the epoll */ + /* We have five bools, and we want to fit them into 4 bytes so the whole struct + * remains 32 bytes. Thus, use bitfields for two of them and single bytes for the + * other three. */ + bool registered; /* whether the pidfd is registered in the epoll */ bool pidfd_owned:1; /* close pidfd when event source is freed */ bool process_owned:1; /* kill+reap process when event source is freed */ - bool exited:1; /* true if process exited (i.e. if there's value in SIGKILLing it if we want to get rid of it) */ - bool waited:1; /* true if process was waited for (i.e. if there's value in waitid(P_PID)'ing it if we want to get rid of it) */ + bool exited; /* true if process exited (i.e. if there's value in SIGKILLing it if + * we want to get rid of it) */ + bool waited; /* true if process was waited for (i.e. if there's value in + * waitid(P_PID)'ing it if we want to get rid of it) */ } child; struct { sd_event_handler_t callback;