aboutsummaryrefslogtreecommitdiff
path: root/libc/startup
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-07-21 10:34:09 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-07-21 10:49:11 -0500
commitd3aabeb7b56b27cfacdc8af74d49d72186d89725 (patch)
treeda4788cb834af1efb170de6b3ae8a631ae9fe78d /libc/startup
parent9996e71f2d73a76dc62eb12fc3012aae91014b27 (diff)
downloadllvm-d3aabeb7b56b27cfacdc8af74d49d72186d89725.zip
llvm-d3aabeb7b56b27cfacdc8af74d49d72186d89725.tar.gz
llvm-d3aabeb7b56b27cfacdc8af74d49d72186d89725.tar.bz2
[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
Diffstat (limited to 'libc/startup')
-rw-r--r--libc/startup/gpu/amdgpu/start.cpp2
-rw-r--r--libc/startup/gpu/nvptx/start.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/libc/startup/gpu/amdgpu/start.cpp b/libc/startup/gpu/amdgpu/start.cpp
index 7081ae6..b2adb1d 100644
--- a/libc/startup/gpu/amdgpu/start.cpp
+++ b/libc/startup/gpu/amdgpu/start.cpp
@@ -47,7 +47,7 @@ extern "C" [[gnu::visibility("protected"), clang::amdgpu_kernel]] void
_begin(int argc, char **argv, char **env, void *rpc_shared_buffer) {
// We need to set up the RPC client first in case any of the constructors
// require it.
- __llvm_libc::rpc::client.reset(__llvm_libc::rpc::DEFAULT_PORT_COUNT,
+ __llvm_libc::rpc::client.reset(__llvm_libc::rpc::MAX_PORT_COUNT,
rpc_shared_buffer);
// We want the fini array callbacks to be run after other atexit
diff --git a/libc/startup/gpu/nvptx/start.cpp b/libc/startup/gpu/nvptx/start.cpp
index 90f0049..cd44239 100644
--- a/libc/startup/gpu/nvptx/start.cpp
+++ b/libc/startup/gpu/nvptx/start.cpp
@@ -45,7 +45,7 @@ extern "C" [[gnu::visibility("protected"), clang::nvptx_kernel]] void
_begin(int argc, char **argv, char **env, void *rpc_shared_buffer) {
// We need to set up the RPC client first in case any of the constructors
// require it.
- __llvm_libc::rpc::client.reset(__llvm_libc::rpc::DEFAULT_PORT_COUNT,
+ __llvm_libc::rpc::client.reset(__llvm_libc::rpc::MAX_PORT_COUNT,
rpc_shared_buffer);
// We want the fini array callbacks to be run after other atexit