[libc-commits] [PATCH] D149788: [libc][rpc] Simplify mailbox state tracking

Jon Chesterfield via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 3 14:45:35 PDT 2023


JonChesterfield created this revision.
JonChesterfield added reviewers: jhuber6, jdoerfert, tianshilei1992, michaelrj, sivachandra, tra, gchatelet.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
JonChesterfield requested review of this revision.

Removes the redundant Ack/Data bit manipulation.

Represents the inbox/outbox state with one bit instead of two. This will
be useful if we change to a packed representation and otherwise cuts the
runtime state space from 16 to 4.

Further simplification is possible, this patch is intentionally minimal.

- can_{send,recv}_data are now in == out
- {client,server}::try_open can be factored into Process:try_open

This implements the state machine of D148191 <https://reviews.llvm.org/D148191>, modulo differences in atomic
ordering and fences.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149788

Files:
  libc/src/__support/OSUtil/gpu/io.cpp
  libc/src/__support/OSUtil/gpu/quick_exit.cpp
  libc/src/__support/RPC/rpc.h
  libc/test/integration/startup/gpu/rpc_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149788.519260.patch
Type: text/x-patch
Size: 10763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230503/8015989c/attachment-0001.bin>


More information about the libc-commits mailing list