[libc] Implement `exit` for the GPU partially
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 27 Apr 2023 18:05:29 +0000 (13:05 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 28 Apr 2023 01:32:00 +0000 (20:32 -0500)
commit443d71527be0a052b2f533e4ad540733279ce46b
tree98526eef595809bbb466ff7c8304254898c31a6c
parentf7d5e9bc4ce5db276d5c0965dde4c4d323f699d1
[libc] Implement `exit` for the GPU partially

This patch implements the `exit` function on the GPU. This required
breaking the entrypoints calling eachother on `linux` since this doesn't
work with a non-aliased target. This is only partial support because
full support requires a malloc / free implementation for the exit
callbacks array.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149363
libc/config/gpu/entrypoints.txt
libc/src/stdlib/CMakeLists.txt
libc/src/stdlib/_Exit.cpp [moved from libc/src/stdlib/linux/_Exit.cpp with 59% similarity]
libc/src/stdlib/exit.cpp
libc/src/stdlib/linux/CMakeLists.txt