Date: Fri, 09 Jan 2026 13:03:38 -0300
On Friday, 9 January 2026 09:31:56 Brasilia Standard Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> > And why wouldn't a plain struct of the same size suffice?
>
> Looking at GNU g++, LLVM clang, Intel ICX, Microsoft MSVC:
Ignoring the rest of the reply.
Please reply with quotes from the Standard,not implementations.
> 2) Maybe we should have a type called 'lockfree_pointer_pair' that
> is always lockfree, meaning that it uses CPU instructions to achieve
> lockfreeness. If you run such a binary on a computer which is missing
> the lockfree instruction, you get SIGILL for Illegal Instruction.
Dead on arrival. It's impossible to implement that lock-free in all
architectures, so it'll never be added to the Standard.
Gotham via Std-Proposals wrote:
> > And why wouldn't a plain struct of the same size suffice?
>
> Looking at GNU g++, LLVM clang, Intel ICX, Microsoft MSVC:
Ignoring the rest of the reply.
Please reply with quotes from the Standard,not implementations.
> 2) Maybe we should have a type called 'lockfree_pointer_pair' that
> is always lockfree, meaning that it uses CPU instructions to achieve
> lockfreeness. If you run such a binary on a computer which is missing
> the lockfree instruction, you get SIGILL for Illegal Instruction.
Dead on arrival. It's impossible to implement that lock-free in all
architectures, so it'll never be added to the Standard.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-01-09 16:03:49
