Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ​barriers

Greg Burd <greg@burd.me>

From: "Greg Burd" <greg@burd.me>
To: "Thomas Munro" <thomas.munro@gmail.com>, "Andres Freund" <andres@anarazel.de>, "Nathan Bossart" <nathandbossart@gmail.com>, "Peter Eisentraut" <peter@eisentraut.org>, "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Cc: "Dave Cramer" <davecramer@gmail.com>
Date: 2025-11-24T16:28:28Z
Lists: pgsql-hackers

Attachments

On Mon, Nov 24, 2025, at 10:04 AM, Greg Burd wrote:
> Hello,
>
> v3 attached is a more concise single patch that adds support for MSVC 
> on Win11 ARM64.  The issues fixed are mostly related to config, build, 
> docs, an implementation of spin_delay() and a change to S_UNLOCK() 
> macro.  I've squished the work we did into a single commit and improved 
> the commit message.  Thomas, I think in another thread you mentioned 
> that some of what Dave added came from you, correct?  We should add you 
> as another author if so, right?
>
> best.
>
> -greg
>
> Attachments:
> * v3-0001-Enable-PostgreSQL-build-on-Windows-11-ARM64-with-.patch

I forgot to account for the non-ARM64 implementation of S_UNLOCK(), thanks CI for pointing that out.

-greg