[all-commits] [llvm/llvm-project] 82bddc: [libc] Mutex implementation for single-threaded ba...
William Huynh via All-commits
all-commits at lists.llvm.org
Thu Jul 31 04:17:06 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 82bddc3e64e03ec4bb07ad9c757d2a06b5acb0c0
https://github.com/llvm/llvm-project/commit/82bddc3e64e03ec4bb07ad9c757d2a06b5acb0c0
Author: William Huynh <William.Huynh at arm.com>
Date: 2025-07-31 (Thu, 31 Jul 2025)
Changed paths:
M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
M libc/config/baremetal/config.json
M libc/config/config.json
M libc/config/gpu/amdgpu/config.json
M libc/config/gpu/nvptx/config.json
M libc/docs/configure.rst
M libc/src/__support/threads/CMakeLists.txt
R libc/src/__support/threads/gpu/CMakeLists.txt
R libc/src/__support/threads/gpu/mutex.h
M libc/src/__support/threads/mutex.h
Log Message:
-----------
[libc] Mutex implementation for single-threaded baremetal (#145358)
Part of https://github.com/llvm/llvm-project/issues/145349. Required to
allow `atexit` to work. As part of `HermeticTestUtils.cpp`, there is a
reference to `atexit()`, which eventually instantiates an instance of a
Mutex.
Instead of copying the implementation from
`libc/src/__support/threads/gpu/mutex.h`, we allow platforms to select
an implementation based on configurations, allowing the GPU and
single-threaded baremetal platforms to share an implementation. This can
be configured or overridden.
Later, when the threading API is more complete, we can add an option to
support multithreading (or set it as the default), but having
single-threading (in tandem) is in line with other libraries for
embedded devices.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list