[libc-commits] [PATCH] D150703: [libc] Restrict access to the RPC Process internals

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 17 15:48:33 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG155191e9fdae: [libc] Restrict access to the RPC Process internals (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150703/new/

https://reviews.llvm.org/D150703

Files:
  libc/src/__support/RPC/rpc.h


Index: libc/src/__support/RPC/rpc.h
===================================================================
--- libc/src/__support/RPC/rpc.h
+++ libc/src/__support/RPC/rpc.h
@@ -97,6 +97,9 @@
   LIBC_INLINE Process &operator=(Process &&) = default;
   LIBC_INLINE ~Process() = default;
 
+  template <bool T> friend struct Port;
+
+protected:
   uint64_t port_count;
   uint32_t lane_size;
   cpp::Atomic<uint32_t> *inbox;
@@ -105,6 +108,7 @@
 
   cpp::Atomic<uint32_t> lock[DEFAULT_PORT_COUNT] = {0};
 
+public:
   /// Initialize the communication channels.
   LIBC_INLINE void reset(uint64_t port_count, uint32_t lane_size,
                          void *buffer) {
@@ -131,6 +135,7 @@
     return buffer_offset(port_count) + buffer_bytes(port_count, lane_size);
   }
 
+protected:
   /// The length of the packet is flexible because the server needs to look up
   /// the lane size at runtime. This helper indexes at the proper offset.
   LIBC_INLINE Packet &get_packet(uint64_t index) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150703.523199.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230517/e35afdc2/attachment-0001.bin>


More information about the libc-commits mailing list