Skip to content

[cppabi64] Document that interference constants are not ABI stable#389

Open
smithp35 wants to merge 1 commit intoARM-software:mainfrom
smithp35:cppabi64interference
Open

[cppabi64] Document that interference constants are not ABI stable#389
smithp35 wants to merge 1 commit intoARM-software:mainfrom
smithp35:cppabi64interference

Conversation

@smithp35
Copy link
Copy Markdown
Contributor

@smithp35 smithp35 commented Apr 1, 2026

The std::hardware_constructive_interference and
std::hardware_destructive_interference constants are meant to represent maximum and mininum distances between concurrently accessed objects.

These values depend on the target CPU and known C++ library implementations such as libc++ and libstdc++ may set the value of these constants based on a target specific macro.

Document that these constants are not ABI stable to discourage people from using them across ABI interface boundaries.

LLVM Discourse discussion:
https://discourse.llvm.org/t/rfc-c-17-hardware-constructive-destructive-interference-size/48674

Fixes #387

The std::hardware_constructive_interference and
std::hardware_destructive_interference constants are meant to
represent maximum and mininum distances between concurrently
accessed objects.

These values depend on the target CPU and known C++ library
implementations such as libc++ and libstdc++ may set the
value of these constants based on a target specific macro.

Document that these constants are not ABI stable to discourage
people from using them across ABI interface boundaries.

LLVM Discourse discussion:
https://discourse.llvm.org/t/rfc-c-17-hardware-constructive-destructive-interference-size/48674

Fixes ARM-software#387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document std::hardware_ destructive/constructive _interference_size

1 participant