[libc] Treat the locks array as a bitfield
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 18 Jul 2023 15:22:01 +0000 (10:22 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 18 Jul 2023 16:34:21 +0000 (11:34 -0500)
commit05abcc579244b68162b847a6780d27b22bd58f74
tree112385134836ef333baeacf4dc1a5e563d8c486f
parent3ad4f92f83b7a6a79957c9413dfa3a2667c236a6
[libc] Treat the locks array as a bitfield

Currently we keep an internal buffer of device memory that is used to
indicate ownership of a port. Since we only use this as a single bit we
can simply turn this into a bitfield. I did this manually rather than
having a separate type as we need very special handling of the masks
used to interact with the locks.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D155511
libc/src/__support/RPC/rpc.h
libc/startup/gpu/amdgpu/start.cpp
libc/startup/gpu/nvptx/start.cpp
libc/utils/gpu/server/rpc_server.cpp
libc/utils/gpu/server/rpc_server.h