]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: use atomic C types with atomic C functions
authorJoel Sing <joel@sing.id.au>
Mon, 8 Dec 2025 13:11:55 +0000 (00:11 +1100)
committerMichael Knyszek <mknyszek@google.com>
Mon, 8 Dec 2025 15:59:15 +0000 (07:59 -0800)
Mark types as _Atomic - fixes breakage introduced in CL 726964
across most LLVM based platforms/builders.

Change-Id: I5e64b9ccb0cf5244977a787a52ee124bc03c10de
Reviewed-on: https://go-review.googlesource.com/c/go/+/728040
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/testdata/testprogcgo/notingo.go

index e5b1062e9e3eab339efb28e8c0e2f487a10a8d14..6e781263586a72004c6103709690e09bed7c7c3d 100644 (file)
@@ -14,8 +14,8 @@ package main
 
 extern void Ready();
 
-static int spinning;
-static int released;
+static _Atomic int spinning;
+static _Atomic int released;
 
 static void* enterGoThenSpinTwice(void* arg __attribute__ ((unused))) {
        Ready();