github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sync/runtime_go121_unsafe.go (about) 1 // Copyright 2023 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 //go:build go1.21 7 8 package sync 9 10 import ( 11 "unsafe" 12 ) 13 14 // Use checkoffset to assert that maptype.hasher (the only field we use) has 15 // the correct offset. 16 const maptypeHasherOffset = unsafe.Offsetof(maptype{}.Hasher) // +checkoffset internal/abi MapType.Hasher