runtime_go121_unsafe.go raw

   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 && !go1.24
   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
  17