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

700 Commits

Author SHA1 Message Date
Andrey Semashev
b91d55150f Added a changelog entry for pause on RISC-V. 2024-01-15 14:46:39 +03:00
Andrey Semashev
62c5ff91f0 Merge pull request #65 from XieJiSS/patch-1
Implement pause support for RISC-V
2024-01-15 14:43:19 +03:00
XieJiSS
ce34f076a0 fix: remove rocket-specific code introduced from the kernel 2024-01-15 13:41:29 +08:00
Andrey Semashev
faec57c701 Fixed clang-17 package name. 2024-01-14 23:25:59 +03:00
Andrey Semashev
5332620643 Added clang-17 GHA jobs. 2024-01-14 22:39:50 +03:00
Andrey Semashev
21f16c1d2c Use a more wide description of the library in metadata. 2024-01-03 00:34:05 +03:00
Andrey Semashev
607c57bdce Moved Windows shell option to defaults in GHA config. boost-1.84.0 boost-1.84.0.beta1 2023-11-07 14:56:53 +03:00
Andrey Semashev
a9588809b4 Added GitHub Actions job for CMake on Windows. 2023-11-05 19:40:39 +03:00
Andrey Semashev
d36a1285a0 Added Windows CI to GitHub Actions. 2023-11-05 19:25:20 +03:00
XieJiSS
38fa36952d Implement pause support for RISC-V
see-also: 84186fcb83/arch/riscv/include/asm/vdso/processor.h (L9)
2023-10-24 11:03:43 +08:00
Andrey Semashev
6ec7f682f8 Added a note about deprecation of Windows versions prior to 10. 2023-10-08 20:49:09 +03:00
Andrey Semashev
65c51f5bf5 Added CMake target compile feature cxx_static_assert. 2023-10-01 17:26:33 +03:00
Andrey Semashev
a01d1f6f1c Updated cxxstd to 11 in library metadata. 2023-10-01 17:18:51 +03:00
Andrey Semashev
ba4dc4c595 Merge pull request #63 from Flamefire/cxx11-requires
Add C++11 requirements to Jamfile
2023-09-11 17:16:52 +03:00
Alexander Grund
12b2a55f17 Add C++11 requirements to Jamfile 2023-09-11 12:50:44 +02:00
Andrey Semashev
107aad606c Removed legacy MinGW32 from AppVeyor CI.
Legacy MinGW32 does not seem to support std::thread and other C++11
multithreading components. We are dropping support for this compiler
as we are no longer able to test it.

MinGW-w64 is still supported.
2023-09-04 00:33:11 +03:00
Andrey Semashev
aebe9d585c Switched tests to std::thread and std::chrono.
This removes dependencies on Boost.Thread and Boost.Chrono, as well as
their dependencies and potentially allows to test more compilers. In particular,
this removes the dependency on Boost.Lexical cast, which no longer compiles
with gcc 4.6 and 4.7.
2023-09-03 22:11:23 +03:00
Andrey Semashev
8f480549ee Use C++11 static_assert.
This removes the dependency on Boost.StaticAssert.
2023-09-03 22:03:19 +03:00
Andrey Semashev
4a9078a7b8 Dropping support for C++03 compilers.
As a result of dependent libraries dropping support for C++03, Boost.Atomic
is no longer able to support C++03 and now requires C++11 as a minimum.

Drop C++03 compilers from the CI and update docs accordingly. No code changes
at this time.
2023-09-02 19:31:10 +03:00
Andrey Semashev
f7735b60a6 Added support for x87 extended double with reduced precision.
On FreeBSD and OpenBSD 32-bit x86 targets are configured to use 53-bit precision
for long double type. The value still uses 80 bits of storage, but the lowest
11 bits of mantissa are zero.

While at it, also added support for 24-bit precision, which can be configured
in x87. Though the platforms where this configuration is used by default are
not known.

Also, when possible, use predefined macros by gcc and compatible compilers and
avoid including standard library header for defining floating point limit macros.

Related to https://github.com/boostorg/atomic/issues/14.
2023-08-22 13:50:45 +03:00
Andrey Semashev
001c1d96a8 Added clang-16 CI jobs. boost-1.83.0.beta1 boost-1.83.0 2023-06-05 03:09:41 +03:00
Andrey Semashev
2d45635e5b Made bitwise_cast compatible with const-qualified target types. 2023-04-29 17:52:59 +03:00
Andrey Semashev
474e125ab6 Fixed compilation of atomic_ref for const-qualified types.
Fixes https://github.com/boostorg/atomic/issues/62.
2023-04-29 15:11:25 +03:00
Andrey Semashev
295afdecd7 Added a note about C++03 deprecation.
Boost libraries that deprecate C++03 support (namely, Boost.Chrono) are not
used in Boost.Atomic implementation, but they are used in tests (indirectly
through Boost.Thread), which means it will become impossible to test
Boost.Atomic when the support is removed.
boost-1.82.0
2023-03-29 02:27:26 +03:00
Andrey Semashev
39a184f68a Mention that atomics are only supposed to work in WB memory. boost-1.82.0.beta1 2023-02-28 12:24:54 +03:00
Andrey Semashev
c277de6b49 Removed atomic<>::storage() and storage_type.
These public members were deprecated since Boost.Atomic 1.73.
2022-12-22 18:32:09 +03:00
Andrey Semashev
2834450fc3 Only use x86 vector insns for stores with memory orders other than seq_cst.
For seq_cst we must issue a memory fence, so in this case use
cmpxchg8b/cmpxchg16b.

Also, optimized 32-bit x86 code path to make the compiler pass the value
to and from the xmm register instead of hardcoding it in asm blocks.
2022-12-22 14:33:25 +03:00
Andrey Semashev
24a41db3e6 Use AVX instructions for 128-bit loads and stores on x86.
Latest edition of SDM explicitly guarantees that any CPU supporting
AVX guarantees atomicity of aligned 128-bit loads and stores using
movdqa and similar instructions. AMD also confirmed this for their
CPUs here:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688#c10

And also Zhiaoxin:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688#c20
2022-12-22 14:29:11 +03:00
Andrey Semashev
195d0b9854 Added tests for relaxed loads and stores.
This will involve different branches of code in some asm-based backends.
2022-12-21 21:03:50 +03:00
Andrey Semashev
7b26230274 Use AVX instruction set in CI.
Enabling AVX will allow to test future updates that will use these
instructions.

Since MSVC doesn't allow to enable instruction sets for the current CPU,
we enable AVX unconditionally there, in hope that AppVeyor CI runners
support AVX.

Also, different clang versions exhibit various issues in GitHub Actions
when "native" instruction set is enabled, so we also explicitly specify
the instruction set we want for GHA.
2022-12-21 18:24:39 +03:00
Andrey Semashev
5c87b2690f Use VEX-coded vpand in asm if the library is compiled for AVX and later. 2022-12-21 04:31:14 +03:00
Andrey Semashev
561fc75391 Updated to GHA checkout@v3 to avoid deprecation warnings. boost-1.81.0.beta1 boost-1.81.0 2022-10-18 17:54:41 +03:00
Andrey Semashev
456d3c5ce5 Updated python package installation in GHA. 2022-09-09 03:44:11 +03:00
Andrey Semashev
b4ec62ed4e Added gcc-12 and clang-13 through 15 jobs to GHA config. 2022-09-09 02:24:31 +03:00
Andrey Semashev
581dd7953f Updated copyright years. 2022-08-14 14:03:03 +03:00
Andrey Semashev
5104a274e2 Use ubuntu-latest host image for GHA CI jobs that run in a container. 2022-08-14 13:44:36 +03:00
Andrey Semashev
74a4b37cce Fixed a typo in the comment in GHA config. 2022-08-14 13:20:38 +03:00
Andrey Semashev
f72bef98e0 Switch to macos-11 GHA image as macos-10.15 is deprecated. 2022-08-12 15:55:32 +03:00
Andrey Semashev
e44ef5fa3d Ported to BOOST_NO_CXX17_DEDUCTION_GUIDES from Boost.Config. boost-1.80.0 boost-1.80.0.beta1 2022-06-17 01:16:55 +03:00
Andrey Semashev
0283645877 Added C++20 mode to VS2019 job in AppVeyor CI. 2022-06-06 02:46:48 +03:00
Andrey Semashev
4a0dd1da06 Added VS2022 job in AppVeyor CI. 2022-06-05 21:02:47 +03:00
Andrey Semashev
963b694313 Added a release note for the fixed compilation with MSVC 14.0. 2022-06-04 20:33:27 +03:00
Andrey Semashev
bc04059ba6 Added C++latest to MSVC and clang-cl AppVeyor CI jobs. 2022-06-04 20:22:06 +03:00
Andrey Semashev
8048cbe6c3 Disable has_unique_object_representations for MSVC 14.0.
The standard library does not support this trait.

Fixes https://github.com/boostorg/atomic/issues/61.
2022-06-04 20:21:04 +03:00
Andrey Semashev
b1cd90dcec Improved endianness checks portability on ARM, AArch32 and AArch64.
When gcc predefined macros are not defined, use Boost.Predef (which also
checks macros defined in the system endian.h header) to detect endianness.
This may help with gcc impostor compilers that do not define built-in
endianness macros.

Closes https://github.com/boostorg/atomic/issues/59.
2022-04-26 11:39:16 +03:00
Andrey Semashev
31851afa14 Fixed docs redirection URL.
Fixes https://github.com/boostorg/atomic/issues/58.
2022-04-18 15:13:25 +03:00
Andrey Semashev
a172675470 Added source directories to include directories.
This fixes compilation on systems where the compiler does not resolve
includes relative to the current source file directory.

Fixes https://github.com/boostorg/atomic/issues/56.
Closes https://github.com/boostorg/atomic/pull/57.
boost-1.79.0.beta1 boost-1.79.0
2022-03-07 01:21:19 +03:00
Andrey Semashev
08a055ec27 Added BOOST_ATOMIC_NO_DARWIN_ULOCK macro.
The new macro disables ulock-based implementation of waiting and notifying
operations on Darwin systems. This may be useful to comply with Apple
App Store requirements.

Closes https://github.com/boostorg/atomic/issues/55.
2022-03-04 22:36:40 +03:00
Andrey Semashev
8915f67c0e Extracted Boost library include paths collection to a CMake module.
Also, save the collected paths to a global property to avoid potentially
scanning the filesystem in every library that needs these paths.
2022-02-04 14:36:39 +03:00
Andrey Semashev
3cb232ffd8 Added detection of support for C++17 deduction guides in MSVC. 2022-01-21 00:50:35 +03:00