[all-commits] [llvm/llvm-project] 5442e1: [libc][__support] move CndVar to __support (#89329)
Nick Desaulniers (paternity leave) via All-commits
all-commits at lists.llvm.org
Tue May 21 15:50:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5442e15a152614628e2e2bef250c91eacf75fc9c
https://github.com/llvm/llvm-project/commit/5442e15a152614628e2e2bef250c91eacf75fc9c
Author: Nick Desaulniers (paternity leave) <nickdesaulniers at users.noreply.github.com>
Date: 2024-05-21 (Tue, 21 May 2024)
Changed paths:
M libc/src/__support/threads/CMakeLists.txt
A libc/src/__support/threads/CndVar.h
M libc/src/__support/threads/linux/CMakeLists.txt
A libc/src/__support/threads/linux/CndVar.cpp
M libc/src/threads/linux/CMakeLists.txt
R libc/src/threads/linux/CndVar.h
M libc/src/threads/linux/cnd_broadcast.cpp
M libc/src/threads/linux/cnd_destroy.cpp
M libc/src/threads/linux/cnd_init.cpp
M libc/src/threads/linux/cnd_signal.cpp
M libc/src/threads/linux/cnd_wait.cpp
Log Message:
-----------
[libc][__support] move CndVar to __support (#89329)
We should be able to reuse this between the implementation of C11 cnd_t
condition variables and POSIX pthread_cond_t condition variables.
The current implementation is hyper linux specific, making use of Futex. That
obviously wont work outside of linux, so split the OS specific functions off
into their own source outside of the header.
Modifies the return values of the to-be-shared impl to return 0 on success and
-1 on error. This pattern was shamelessly stolen from Bionic's
[__bionic_thrd_error](https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/threads_inlines.h#41).
Fixes: #88580
Link: #88583
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