The indirection here is for some reason causing an unnecessary
constructor. If we leave this uninitialized we will get the default
constructor which simply zero initliaizes the global. I've checked the
output and confirmed that it uses the `zeroinitializer` so this should
be safe.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D155720
LIBC_INLINE Process &operator=(Process &&) = default;
LIBC_INLINE ~Process() = default;
- uint64_t port_count;
- cpp::Atomic<uint32_t> *inbox;
- cpp::Atomic<uint32_t> *outbox;
- Packet *packet;
+ uint64_t port_count = 0;
+ cpp::Atomic<uint32_t> *inbox = nullptr;
+ cpp::Atomic<uint32_t> *outbox = nullptr;
+ Packet *packet = nullptr;
cpp::Atomic<uint32_t> lock[DEFAULT_PORT_COUNT] = {0};