Update dependencies
This commit is contained in:
15
vendor/gvisor.dev/gvisor/pkg/sync/aliases.go
vendored
15
vendor/gvisor.dev/gvisor/pkg/sync/aliases.go
vendored
@@ -34,3 +34,18 @@ type (
|
||||
func NewCond(l Locker) *Cond {
|
||||
return sync.NewCond(l)
|
||||
}
|
||||
|
||||
// OnceFunc is a wrapper around sync.OnceFunc.
|
||||
func OnceFunc(f func()) func() {
|
||||
return sync.OnceFunc(f)
|
||||
}
|
||||
|
||||
// OnceValue is a wrapper around sync.OnceValue.
|
||||
func OnceValue[T any](f func() T) func() T {
|
||||
return sync.OnceValue(f)
|
||||
}
|
||||
|
||||
// OnceValues is a wrapper around sync.OnceValues.
|
||||
func OnceValues[T1, T2 any](f func() (T1, T2)) func() (T1, T2) {
|
||||
return sync.OnceValues(f)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.21
|
||||
//go:build go1.21 && !go1.24
|
||||
|
||||
package sync
|
||||
|
||||
|
||||
14
vendor/gvisor.dev/gvisor/pkg/sync/runtime_go124_unsafe.go
vendored
Normal file
14
vendor/gvisor.dev/gvisor/pkg/sync/runtime_go124_unsafe.go
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2024 The gVisor Authors.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.24
|
||||
|
||||
package sync
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// Use checkoffset to assert that maptype.hasher (the only field we use) has
|
||||
// the correct offset.
|
||||
const maptypeHasherOffset = unsafe.Offsetof(maptype{}.Hasher) // +checkoffset internal/abi SwissMapType.Hasher
|
||||
Reference in New Issue
Block a user