2
0
mirror of https://github.com/boostorg/atomic.git synced 2026-01-19 04:02:09 +00:00

11 Commits

Author SHA1 Message Date
Andrey Semashev
e57de610db Use a relative path to atomic-arch-config instead of import-search.
Using a relative path is more explicit and should avoid a potential
name clash in case if there appears a different b2 module with the same
name in a different search location.
2025-06-19 02:34:11 +03:00
Andrey Semashev
1464ef7c2a Fix b2 import search path for configure-time checks.
Added a missing import-search directive to config/Jamfile so that
atomic-arch-config.jam is found when configure-time checks are invoked
from tests. This allows us to enable the type_traits check for tests.
2025-06-18 20:32:30 +03:00
Andrey Semashev
cbe50fe500 Restore compatibility with older gcc versions.
Added is_trivially_copyable and is_trivially_default_constructible type
traits that rely on the non-standard type traits available in libstdc++
from gcc 4.8 and 4.9.

Rather than requiring cxx11_hdr_type_traits in the library and test
requirements, use a more limited test that checks only the type traits
we use in Boost.Atomic.

Similarly, downgrade the requirement of C++ unrestricted unions to
unions with members that have non-trivial default constructors.

Remove the requirements of alignas and alignof, since those are not
mandatory for now.

Closes https://github.com/boostorg/atomic/issues/74.
2025-06-18 19:09:03 +03:00
Andrey Semashev
0a14751832 Nonessential. 2025-06-16 18:02:02 +03:00
Andrey Semashev
5991e99381 Added timed wait operations to lock pool.
Added a configure test for pthread_cond_clockwait presence. If it is
available, use it for timed waits with absolute timeouts on POSIX platforms.

Futex-based implementation has been improvved to use proper atomic operations
to access m_cond, which is needed to avoid races between the futex syscall and
our notifying operations. Also, check if m_cond has changed whil looping in
the waiting operations.
2025-06-08 04:37:51 +03:00
Andrey Semashev
411f6f65ab Removed support for Windows versions prior to Windows 10.
This makes WaitOnAddress/WakeByAddressSingle/WakeByAddressAll a mandatory
requirement. Thus, runtime detection of these APIs is now removed.

Also, linking with synchronization lib on Windows is now mandatory. The
library provides WaitOnAddress & co. which are now mandatory.
2025-05-29 18:06:10 +03:00
Andrey Semashev
805e309a29 Fixed discrepancy between always_has_native_wait_notify and caps macros.
When targeting Windows 8, the always_has_native_wait_notify static constant
would be set to false even though the native implementation of waiting
and notifying operations through WaitOnAddress would always be used.

To fix this, moved direct WaitOnAddress & co. usage to public header. This
also requires users to link with synchronization.lib, which is done
automatically on compilers that support auto-linking.

The compiled library still implements runtime detection of WaitOnAddress,
even when building for Windows 8 and later. This allows user's code to
be later compiled for Windows 7 and older and still work. This code is
not used when user's code targets Windows 8 or later.

As part of this refactoring, renamed has_synchronization test and
related CMake variable to better communicate that we're testing for
a library.
2021-10-09 23:40:42 +03:00
Andrey Semashev
a40aa9ba6c Implemented SSE2 and SSE4.1 versions of address lookup algorithms. 2020-09-07 16:57:22 +03:00
Andrey Semashev
06dcdf26c6 Added a configure check to test if synchronization.lib exists.
We need to explicitly link with synchronization.lib when the
WaitOnAddress API is enabled at compile time for ARM targets. Since
this library is only available on newer Windows SDKs, we have to perform
a configure check for whether it is available.
2020-06-21 19:07:28 +03:00
Andrey Semashev
640f1796b0 Use Boost.Build feature to select hidden visibility. 2018-08-20 14:59:57 +03:00
Andrey Semashev
056588ab42 Switched to hidden visibility when building Boost.Atomic library. 2018-08-17 11:17:23 +03:00