File tree 4 files changed +6
-4
lines changed
4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3
3
// license that can be found in the LICENSE file.
4
4
5
5
// Assembly to get into package runtime without using exported symbols.
6
- // See http ://tip. golang.org /misc/cgo/test/backdoor/thunk.s.
6
+ // See https ://github.com/ golang/go/blob/release-branch.go1.4 /misc/cgo/test/backdoor/thunk.s
7
7
8
8
// +build amd64 amd64p32 arm 386
9
9
// +build go1.4,!go1.5
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ package goid
4
4
5
5
import "unsafe"
6
6
7
- // Just enough of the structs from runtime2.go to get the offset to goid.
7
+ // Just enough of the structs from runtime/runtime2.go to get the offset to goid.
8
+ // See https://github.com/golang/go/blob/release-branch.go1.5/src/runtime/runtime2.go
8
9
9
10
type stack struct {
10
11
lo uintptr
Original file line number Diff line number Diff line change 4
4
// +build go1.5
5
5
6
6
#include "textflag.h"
7
-
7
+
8
8
// func getg() uintptr
9
9
TEXT ·getg(SB),NOSPLIT,$0 -8
10
10
MOVQ (TLS), BX
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ package goid
5
5
import "unsafe"
6
6
7
7
// Just enough of the structs from runtime/runtime2.go to get the offset to goid.
8
+ // See https://github.com/golang/go/blob/release-branch.go1.6/src/runtime/runtime2.go
8
9
9
10
type stack struct {
10
11
lo uintptr
@@ -43,7 +44,7 @@ type g struct {
43
44
}
44
45
45
46
// Backdoor access to runtime·getg().
46
- func getg () uintptr // in goid_go1.5plus.s
47
+ func getg () uintptr // in goid_go1.5plus{,_arm} .s
47
48
48
49
func Get () int64 {
49
50
gg := (* g )(unsafe .Pointer (getg ()))
You can’t perform that action at this time.
0 commit comments