[libc-commits] [libc] 387be04 - [libc][NFC] Add const to RPC header members
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Nov 25 07:17:36 PST 2024
Author: Joseph Huber
Date: 2024-11-25T09:11:58-06:00
New Revision: 387be04dde0a2618d2baf37a4652a076c003b4a2
URL: https://github.com/llvm/llvm-project/commit/387be04dde0a2618d2baf37a4652a076c003b4a2
DIFF: https://github.com/llvm/llvm-project/commit/387be04dde0a2618d2baf37a4652a076c003b4a2.diff
LOG: [libc][NFC] Add const to RPC header members
Summary:
Make sure that these don't get modified.
Added:
Modified:
libc/shared/rpc.h
Removed:
################################################################################
diff --git a/libc/shared/rpc.h b/libc/shared/rpc.h
index c5e4277286c399..3f586744377d98 100644
--- a/libc/shared/rpc.h
+++ b/libc/shared/rpc.h
@@ -85,11 +85,11 @@ template <bool Invert> struct Process {
RPC_INLINE Process &operator=(Process &&) = default;
RPC_INLINE ~Process() = default;
- uint32_t port_count = 0;
- uint32_t *inbox = nullptr;
- uint32_t *outbox = nullptr;
- Header *header = nullptr;
- Buffer *packet = nullptr;
+ const uint32_t port_count = 0;
+ const uint32_t *const inbox = nullptr;
+ uint32_t *const outbox = nullptr;
+ Header *const header = nullptr;
+ Buffer *const packet = nullptr;
static constexpr uint64_t NUM_BITS_IN_WORD = sizeof(uint32_t) * 8;
uint32_t lock[MAX_PORT_COUNT / NUM_BITS_IN_WORD] = {0};
More information about the libc-commits
mailing list