update libcxx and libcxxabi to llvm 18.1.6
Contains fixes for OpenBSD
This commit is contained in:
16
lib/libcxxabi/src/cxa_guard_impl.h
vendored
16
lib/libcxxabi/src/cxa_guard_impl.h
vendored
@@ -47,6 +47,9 @@
|
||||
#include "__cxxabi_config.h"
|
||||
#include "include/atomic_support.h" // from libc++
|
||||
#if defined(__has_include)
|
||||
# if __has_include(<sys/futex.h>)
|
||||
# include <sys/futex.h>
|
||||
# endif
|
||||
# if __has_include(<sys/syscall.h>)
|
||||
# include <sys/syscall.h>
|
||||
# endif
|
||||
@@ -411,7 +414,18 @@ private:
|
||||
// Futex Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if defined(SYS_futex)
|
||||
#if defined(__OpenBSD__)
|
||||
void PlatformFutexWait(int* addr, int expect) {
|
||||
constexpr int WAIT = 0;
|
||||
futex(reinterpret_cast<volatile uint32_t*>(addr), WAIT, expect, NULL, NULL);
|
||||
__tsan_acquire(addr);
|
||||
}
|
||||
void PlatformFutexWake(int* addr) {
|
||||
constexpr int WAKE = 1;
|
||||
__tsan_release(addr);
|
||||
futex(reinterpret_cast<volatile uint32_t*>(addr), WAKE, INT_MAX, NULL, NULL);
|
||||
}
|
||||
#elif defined(SYS_futex)
|
||||
void PlatformFutexWait(int* addr, int expect) {
|
||||
constexpr int WAIT = 0;
|
||||
syscall(SYS_futex, addr, WAIT, expect, 0);
|
||||
|
||||
Reference in New Issue
Block a user