diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2024-06-21 17:01:23 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-11-18 19:57:35 +0000 |
| commit | 6c660052856feae2bf1f3fe44665b5da0002500d (patch) | |
| tree | e6a6352be92a049654911bff35fc9c9ce0ce462c /src/runtime/panic.go | |
| parent | b5906ac4b7b455714565fa0a8f53aea966f3fb6f (diff) | |
| download | go-6c660052856feae2bf1f3fe44665b5da0002500d.tar.xz | |
internal/sync: move sync.Mutex implementation into new package
This CL refactors sync.Mutex such that its implementation lives in the
new internal/sync package. The purpose of this change is to eventually
reverse the dependency edge between internal/concurrent and sync, such
that sync can depend on internal/concurrent (or really, its contents,
which will likely end up in internal/sync).
The only change made to the sync.Mutex code is the frame skip count for
mutex profiling, so that the internal/sync frames are omitted in the
profile.
Change-Id: Ib3603d30e8e71508c4ea883a584ae2e51ce40c3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/594056
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/panic.go')
| -rw-r--r-- | src/runtime/panic.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go index e66f5ae942..7447854989 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -1048,6 +1048,16 @@ func maps_fatal(s string) { fatal(s) } +//go:linkname internal_sync_throw internal/sync.throw +func internal_sync_throw(s string) { + throw(s) +} + +//go:linkname internal_sync_fatal internal/sync.fatal +func internal_sync_fatal(s string) { + fatal(s) +} + // throw triggers a fatal error that dumps a stack trace and exits. // // throw should be used for runtime-internal fatal errors where Go itself, |
