aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os3_plan9.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2015-11-11 12:39:30 -0500
committerMichael Matloob <matloob@golang.org>2015-11-12 17:04:45 +0000
commit432cb66f16b2bb6a167725057168bbe4aefe5fb5 (patch)
tree0a6aaf45df2810dc7276212496a4b647ed0bb6d2 /src/runtime/os3_plan9.go
parentb5a0c67fcc2f87b5e2fd04e023f9a0b2f3d759da (diff)
downloadgo-432cb66f16b2bb6a167725057168bbe4aefe5fb5.tar.gz
go-432cb66f16b2bb6a167725057168bbe4aefe5fb5.zip
runtime: break out system-specific constants into package sys
runtime/internal/sys will hold system-, architecture- and config- specific constants. Updates #11647 Change-Id: I6db29c312556087a42e8d2bdd9af40d157c56b54 Reviewed-on: https://go-review.googlesource.com/16817 Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/os3_plan9.go')
-rw-r--r--src/runtime/os3_plan9.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/runtime/os3_plan9.go b/src/runtime/os3_plan9.go
index 43918bb054..f660cc72a7 100644
--- a/src/runtime/os3_plan9.go
+++ b/src/runtime/os3_plan9.go
@@ -4,7 +4,10 @@
package runtime
-import "unsafe"
+import (
+ "runtime/internal/sys"
+ "unsafe"
+)
// May run during STW, so write barriers are not allowed.
//go:nowritebarrier
@@ -69,11 +72,11 @@ func sighandler(_ureg *ureg, note *byte, gp *g) int {
// to sigpanic instead. (Otherwise the trace will end at
// sigpanic and we won't get to see who faulted).
if pc != 0 {
- if regSize > ptrSize {
- sp -= ptrSize
+ if sys.RegSize > sys.PtrSize {
+ sp -= sys.PtrSize
*(*uintptr)(unsafe.Pointer(sp)) = 0
}
- sp -= ptrSize
+ sp -= sys.PtrSize
*(*uintptr)(unsafe.Pointer(sp)) = pc
c.setsp(sp)
}