This is an archive of the discontinued LLVM Phabricator instance.

[libc][NFC] Clean up the memory buffer handling for RPC
ClosedPublic

Authored by jhuber6 on May 15 2023, 7:47 AM.

Details

Summary

We do a lot of arithmetic on void pointers here, so include a helper and
make some more consistent names. Changes no functionality.

Diff Detail

Event Timeline

jhuber6 created this revision.May 15 2023, 7:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 15 2023, 7:47 AM
jhuber6 requested review of this revision.May 15 2023, 7:47 AM
JonChesterfield requested changes to this revision.May 15 2023, 9:20 AM

Size is shorter than the existing names but more likely to be conflated with the array length or number of ports. How about inbox_bytes or similar?

libc/src/__support/RPC/rpc.h
287

Use the template parameter directly please. Memory layout is a compile time property, routing it through a function parameter obfuscates that.

This revision now requires changes to proceed.May 15 2023, 9:20 AM
jhuber6 updated this revision to Diff 522229.May 15 2023, 9:22 AM

Suggested changes.

JonChesterfield accepted this revision.May 15 2023, 9:24 AM
This revision is now accepted and ready to land.May 15 2023, 9:24 AM
This revision was automatically updated to reflect the committed changes.