Re: Trying out <stdatomic.h>
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-13T11:35:48Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add some missing #include <limits.h>.
- 017249b82888 19 (unreleased) landed
-
Enable MSVC conforming preprocessor
- 8fd9bb1d9654 19 (unreleased) cited
Attachments
- v2-0001-ci-Use-Visual-Studio-2022-for-stdatomic.h.patch (application/octet-stream) patch v2-0001
- v2-0002-Enable-Visual-Studio-s-stdatomic.h-support.patch (application/octet-stream) patch v2-0002
- v2-0003-Redefine-port-atomics.h-on-top-of-stdatomic.h.patch (application/octet-stream) patch v2-0003
- v2-0004-Use-atomics-API-to-implement-spinlocks.patch (application/octet-stream) patch v2-0004
- v2-0005-Remove-configure-meson-checks-for-atomics.patch (application/octet-stream) patch v2-0005
On Tue, Nov 11, 2025 at 2:57 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote: > > [PATCH v1 1/4] Add some missing #include <limits.h>. > > This seems like a good thing regardless of the other patches. Pushed. > The patch removes 'src/template/solaris'. Is that on purpose? Fixed. It passes with VS 2022 on CI. I had to skip some assertions about macros promising lock-free implementation, that it doesn't define in C mode yet. They are definitely lock-free though[1], and the macros are defined for C++, and the same under the covers... Perhaps feature/conformance macros won't be defined until a few remaining pieces (things we don't care about) are accessible from C? (I see that Visual Studio 2026 has also just shipped a couple of days ago, not investigated.) [1] https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual-studio-2022-version-17-5-preview-2/