Skip to content

Commit 67b57f6

Browse files
committed
Internal change.
PiperOrigin-RevId: 790622246
1 parent fc9c972 commit 67b57f6

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

pkg/sync/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ go_library(
3131
"runtime_exectracer2.go",
3232
"runtime_go121_unsafe.go",
3333
"runtime_go124_unsafe.go",
34+
"runtime_go126_unsafe.go",
3435
"runtime_not_go121_unsafe.go",
3536
"runtime_other.go",
3637
"runtime_spinning_amd64.s",

pkg/sync/runtime_go124_unsafe.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
// Use of this source code is governed by a BSD-style
44
// license that can be found in the LICENSE file.
55

6-
//go:build go1.24
6+
// https://go.dev/cl/691596 (1.26) renames the internal map type which nogo relies on.
7+
//go:build go1.24 && !go1.26
78

89
package sync
910

pkg/sync/runtime_go126_unsafe.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2024 The gVisor Authors.
2+
//
3+
// Use of this source code is governed by a BSD-style
4+
// license that can be found in the LICENSE file.
5+
6+
// https://go.dev/cl/691596 (1.26) renames the internal map type which nogo relies on.
7+
//go:build go1.26
8+
9+
package sync
10+
11+
import "unsafe"
12+
13+
// Use checkoffset to assert that maptype.hasher (the only field we use) has
14+
// the correct offset.
15+
const maptypeHasherOffset = unsafe.Offsetof(maptype{}.Hasher) // +checkoffset internal/abi MapType.Hasher

0 commit comments

Comments
 (0)