Skip to content

Commit 387be04

Browse files
committed
[libc][NFC] Add const to RPC header members
Summary: Make sure that these don't get modified.
1 parent 6de97e9 commit 387be04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libc/shared/rpc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ template <bool Invert> struct Process {
8585
RPC_INLINE Process &operator=(Process &&) = default;
8686
RPC_INLINE ~Process() = default;
8787

88-
uint32_t port_count = 0;
89-
uint32_t *inbox = nullptr;
90-
uint32_t *outbox = nullptr;
91-
Header *header = nullptr;
92-
Buffer *packet = nullptr;
88+
const uint32_t port_count = 0;
89+
const uint32_t *const inbox = nullptr;
90+
uint32_t *const outbox = nullptr;
91+
Header *const header = nullptr;
92+
Buffer *const packet = nullptr;
9393

9494
static constexpr uint64_t NUM_BITS_IN_WORD = sizeof(uint32_t) * 8;
9595
uint32_t lock[MAX_PORT_COUNT / NUM_BITS_IN_WORD] = {0};

0 commit comments

Comments
 (0)