[libc-commits] [PATCH] D159210: [libc] Implement the 'abort' function on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 30 08:23:07 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, sivachandra.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
jhuber6 requested review of this revision.

This function implements the `abort` function on the GPU. The
implementation here closely mirros the `exit` call where we first
synchornize with the RPC server to make sure it's listening and then we
exit on the GPU.

I was unsure if this should be a simple `__builtin_assert` on the GPU. I
elected to go with an RPC approach to make this a more "true" `abort`
call. That is, it should invoke some signal handlers and exit with the
proper code according to the implemented C library on the server.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159210

Files:
  libc/config/gpu/entrypoints.txt
  libc/docs/gpu/support.rst
  libc/include/llvm-libc-types/rpc_opcodes_t.h
  libc/src/stdlib/gpu/CMakeLists.txt
  libc/src/stdlib/gpu/abort.cpp
  libc/utils/gpu/server/rpc_server.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159210.554733.patch
Type: text/x-patch
Size: 3470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230830/065d053f/attachment-0001.bin>


More information about the libc-commits mailing list