[libc-commits] [PATCH] D149226: [libc] Partially implement `atexit` on the GPU
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 25 19:37:32 PDT 2023
jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, sivachandra, michaelrj, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
The `atexit` function controls registering functions to call at the end
of the program. This is difficult to do in general on the GPU because of
the lack of a real mutex implementation. We primarily provide this for
testing where we can explicitly restrict how the `atexit` registration
functions are called. So we simply create a passthrough Mutex to get
past the usage of it as per @sivachandra's suggestion.
Depends on D149225 <https://reviews.llvm.org/D149225>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149226
Files:
libc/config/gpu/api.td
libc/config/gpu/entrypoints.txt
libc/src/__support/threads/gpu/CMakeLists.txt
libc/src/__support/threads/gpu/mutex.h
libc/src/__support/threads/mutex.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149226.517026.patch
Type: text/x-patch
Size: 3252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230426/a2baa2ef/attachment.bin>
More information about the libc-commits
mailing list