614 Commits

Author SHA1 Message Date
Andrey Semashev
199906f4e1 Use atomic intrinsics for loads on ARMv8.3-RCPC with recent gcc and clang.
gcc 13.1 and clang 16 now generate the ldapr instructions for atomic loads
when ARMv8.3-RCPC or later is enabled. Resorting to inline asm for this
is no longer necessary.
boost-1.88.0.beta1 boost-1.88.0
2025-02-22 18:03:43 +03:00
Andrey Semashev
037f686d36 Added more compilers to GitHub Actions CI, removed macos-12 job.
Added more recent gcc and clang versions, reduced usage of external package
repositories. macos-12 image is now removed from GitHub Actions, so removed
the CI job based on it.
2024-12-15 23:28:59 +03:00
Andrey Semashev
5e2e016668 Fixed pointer arithmetics in wait state initialization on reallocation.
Fixes https://github.com/boostorg/atomic/issues/72.
boost-1.87.0
2024-11-21 20:06:41 +03:00
Andrey Semashev
b202228311 Added support for running tests in CMake.
Related to https://github.com/boostorg/atomic/issues/71.
boost-1.87.0.beta1
2024-10-19 17:29:55 +03:00
Andrey Semashev
d5914e357f Work around MSVC warnings in test code. 2024-10-19 16:06:48 +03:00
René Ferdinand Rivera Morell
0ed0a5db0c
Add support for modular build structure. (#69)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing NO_LIB usage requirements.

* Add requires-b2 check to top-level build file.

* Update dependencies.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Split b2 dependencies into public and private.

* Be explicit about the kind of public dependencies and make the winapi be conditional on windows target-os.
2024-10-10 18:31:25 +03:00
Andrey Semashev
54bbc34960
Merge pull request #70 from Flamefire/getprocaddr
Avoid -Wcast-function-type in get_proc_addr
2024-08-26 15:23:51 +03:00
Alexander Grund
f7c51b3012
Avoid -Wcast-function-type in get_proc_addr 2024-08-26 13:03:15 +02:00
Andrey Semashev
c030fbfd29 Moved Boost.Predef to public dependencies in CMakeLists.txt. 2024-08-19 01:52:36 +03:00
Andrey Semashev
fbdb5f44d4 Replaced macos-11 GHA image with 12, 13 and 14 since 11 is being removed. boost-1.86.0.beta1 boost-1.86.0 2024-05-21 01:14:22 +03:00
Andrey Semashev
6ee31382b2 Use futex function wrapper on OpenBSD.
Since recent OpenBSD versions have removed syscall(2) interface, use
futex(2) wrapper that was also added along with the SYS_futex syscall.

Closes https://github.com/boostorg/atomic/pull/68.
2024-05-19 03:23:49 +03:00
Andrey Semashev
5bbcce0f6e Reduced CI job timeouts. boost-1.85.0.beta1 boost-1.85.0 2024-02-06 00:39:32 +03:00
Andrey Semashev
6594779edc Added gcc-13 CI job. 2024-02-06 00:36:58 +03:00
Andrey Semashev
d875b255fb Replaced actions/checkout usage with manual download commands.
This fixes the deprecation warnings for actions/checkout@v3. actions/checkout@v4
is not functional because of the upstream bug:

https://github.com/actions/checkout/issues/1590
2024-02-05 18:34:02 +03:00
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.beta1 boost-1.84.0 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