Skip to content

Commit

Permalink
[libc++] [FreeBSD] correct 64-bit test
Browse files Browse the repository at this point in the history
Using __SIZEOF_LONG__ == 8 rather than __LP64__ is needed so we use umtx
on CHERI.  I accidentally landed an older diff.

Fixes: 17ecbb3
  • Loading branch information
emaste committed Mar 2, 2023
1 parent 9a77a6f commit 0fe1012
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/src/atomic.cpp
Expand Up @@ -77,7 +77,7 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
const_cast<__cxx_atomic_contention_t*>(__ptr), 0);
}

#elif defined(__FreeBSD__) && defined(__LP64__)
#elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8
/*
* Since __cxx_contention_t is int64_t even on 32bit FreeBSD
* platforms, we have to use umtx ops that work on the long type, and
Expand Down

0 comments on commit 0fe1012

Please sign in to comment.