From ab0535ae3fb45ba734d47542cc4845f27f708d1b Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Mon, 29 Dec 2014 01:08:40 -0500 Subject: liblink, cmd/ld, runtime: remove stackguard1 Now that we've removed all the C code in runtime and the C compilers, there is no need to have a separate stackguard field to check for C code on Go stack. Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard. Adjust liblink and cmd/ld as necessary. Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33 Reviewed-on: https://go-review.googlesource.com/2144 Reviewed-by: Keith Randall --- src/runtime/malloc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/malloc.go') diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 9774cbf26f..d6353d95fd 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -64,7 +64,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer { } mp.mallocing = 1 if mp.curg != nil { - mp.curg.stackguard0 = ^uintptr(0xfff) | 0xbad + mp.curg.stackguard = ^uintptr(0xfff) | 0xbad } } @@ -127,7 +127,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer { } mp.mallocing = 0 if mp.curg != nil { - mp.curg.stackguard0 = mp.curg.stack.lo + _StackGuard + mp.curg.stackguard = mp.curg.stack.lo + _StackGuard } // Note: one releasem for the acquirem just above. // The other for the acquirem at start of malloc. @@ -319,7 +319,7 @@ marked: } mp.mallocing = 0 if mp.curg != nil { - mp.curg.stackguard0 = mp.curg.stack.lo + _StackGuard + mp.curg.stackguard = mp.curg.stack.lo + _StackGuard } // Note: one releasem for the acquirem just above. // The other for the acquirem at start of malloc. -- cgit v1.3-5-g9baa