diff options
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/mgc.go | 7 | ||||
-rw-r--r-- | src/runtime/mgc_boring.go | 14 |
2 files changed, 6 insertions, 15 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index b2558c8bd3..f79bd54c5e 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -1536,13 +1536,18 @@ func gcResetMarkState() { // Hooks for other packages var poolcleanup func() -var boringCaches []unsafe.Pointer +var boringCaches []unsafe.Pointer // for crypto/internal/boring //go:linkname sync_runtime_registerPoolCleanup sync.runtime_registerPoolCleanup func sync_runtime_registerPoolCleanup(f func()) { poolcleanup = f } +//go:linkname boring_registerCache crypto/internal/boring.registerCache +func boring_registerCache(p unsafe.Pointer) { + boringCaches = append(boringCaches, p) +} + func clearpools() { // clear sync.Pools if poolcleanup != nil { diff --git a/src/runtime/mgc_boring.go b/src/runtime/mgc_boring.go deleted file mode 100644 index 149ba51dd7..0000000000 --- a/src/runtime/mgc_boring.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build boringcrypto - -package runtime - -import "unsafe" - -//go:linkname boring_registerCache crypto/internal/boring.registerCache -func boring_registerCache(p unsafe.Pointer) { - boringCaches = append(boringCaches, p) -} |