[libc-commits] [PATCH] D150337: [libc][rpc] Allocate a single block of shared memory instead of three

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 10 18:27:59 PDT 2023


JonChesterfield added a comment.

constexpr on the functions allowed ad hoc testing along the lines of:

  enum {N = 128};
  struct equiv {
    atomic<uint32_t> primary[N];
    atomic<uint32_t> secondary[N];
    Packet buffer[N];
  };
  static_assert(Process<false>::memory_offset_primary_mailbox(N) == __builtin_offset(equiv, primary));

but I can't see an obvious place to check in tests like that


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150337



More information about the libc-commits mailing list