vendor: Update everything
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4620
This commit is contained in:
21
vendor/github.com/petermattis/goid/goid_go1.5_amd64.go
generated
vendored
Normal file
21
vendor/github.com/petermattis/goid/goid_go1.5_amd64.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2016 Peter Mattis.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
// implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License. See the AUTHORS file
|
||||
// for names of contributors.
|
||||
|
||||
// +build amd64 amd64p32
|
||||
// +build go1.5
|
||||
|
||||
package goid
|
||||
|
||||
func Get() int64
|
||||
@@ -18,10 +18,12 @@
|
||||
// +build amd64 amd64p32
|
||||
// +build go1.5
|
||||
|
||||
#include "go_asm.h"
|
||||
#include "textflag.h"
|
||||
|
||||
// func getg() uintptr
|
||||
TEXT ·getg(SB),NOSPLIT,$0-8
|
||||
MOVQ (TLS), BX
|
||||
MOVQ BX, ret+0(FP)
|
||||
// func Get() int64
|
||||
TEXT ·Get(SB),NOSPLIT,$0-8
|
||||
MOVQ (TLS), R14
|
||||
MOVQ g_goid(R14), R13
|
||||
MOVQ R13, ret+0(FP)
|
||||
RET
|
||||
26
vendor/github.com/petermattis/goid/goid_go1.5_arm.go
generated
vendored
Normal file
26
vendor/github.com/petermattis/goid/goid_go1.5_arm.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2016 Peter Mattis.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
// implied. See the License for the specific language governing
|
||||
// permissions and limitations under the License. See the AUTHORS file
|
||||
// for names of contributors.
|
||||
|
||||
// +build arm
|
||||
// +build go1.5
|
||||
|
||||
package goid
|
||||
|
||||
// Backdoor access to runtime·getg().
|
||||
func getg() *g // in goid_go1.5plus.s
|
||||
|
||||
func Get() int64 {
|
||||
return getg().goid
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func getg() uintptr
|
||||
// func getg() *g
|
||||
TEXT ·getg(SB),NOSPLIT,$0-8
|
||||
MOVW g, ret+0(FP)
|
||||
RET
|
||||
2
vendor/github.com/petermattis/goid/goid_slow.go
generated
vendored
2
vendor/github.com/petermattis/goid/goid_slow.go
generated
vendored
@@ -13,7 +13,7 @@
|
||||
// permissions and limitations under the License. See the AUTHORS file
|
||||
// for names of contributors.
|
||||
|
||||
// +build go1.4,!go1.5,!amd64,!amd64p32,!arm,!386 go1.5,!go1.6,!amd64,!amd64p32,!arm go1.6,!amd64,!amd64p32,!arm
|
||||
// +build go1.4,!go1.5,!amd64,!amd64p32,!arm,!386 go1.5,!go1.6,!amd64,!amd64p32,!arm go1.6,!amd64,!amd64p32,!arm go1.9,!amd64,!amd64p32,!arm
|
||||
|
||||
package goid
|
||||
|
||||
|
||||
@@ -13,13 +13,10 @@
|
||||
// permissions and limitations under the License. See the AUTHORS file
|
||||
// for names of contributors.
|
||||
|
||||
// +build amd64 amd64p32 arm
|
||||
// +build go1.5,!go1.6
|
||||
|
||||
package goid
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// Just enough of the structs from runtime/runtime2.go to get the offset to goid.
|
||||
// See https://github.com/golang/go/blob/release-branch.go1.5/src/runtime/runtime2.go
|
||||
|
||||
@@ -52,16 +49,8 @@ type g struct {
|
||||
syscallpc uintptr
|
||||
stkbar []uintptr
|
||||
stkbarPos uintptr
|
||||
param unsafe.Pointer
|
||||
param uintptr
|
||||
atomicstatus uint32
|
||||
stackLock uint32
|
||||
goid int64 // Here it is!
|
||||
}
|
||||
|
||||
// Backdoor access to runtime·getg().
|
||||
func getg() uintptr // in goid_go1.5plus.s
|
||||
|
||||
func Get() int64 {
|
||||
gg := (*g)(unsafe.Pointer(getg()))
|
||||
return gg.goid
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
// +build amd64 amd64p32 arm
|
||||
// +build go1.6
|
||||
// +build go1.6,!go1.9
|
||||
|
||||
package goid
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// Just enough of the structs from runtime/runtime2.go to get the offset to goid.
|
||||
// See https://github.com/golang/go/blob/release-branch.go1.6/src/runtime/runtime2.go
|
||||
|
||||
@@ -38,16 +35,8 @@ type g struct {
|
||||
stkbar []uintptr
|
||||
stkbarPos uintptr
|
||||
stktopsp uintptr
|
||||
param unsafe.Pointer
|
||||
param uintptr
|
||||
atomicstatus uint32
|
||||
stackLock uint32
|
||||
goid int64 // Here it is!
|
||||
}
|
||||
|
||||
// Backdoor access to runtime·getg().
|
||||
func getg() uintptr // in goid_go1.5plus{,_arm}.s
|
||||
|
||||
func Get() int64 {
|
||||
gg := (*g)(unsafe.Pointer(getg()))
|
||||
return gg.goid
|
||||
}
|
||||
36
vendor/github.com/petermattis/goid/runtime_go1.9.go
generated
vendored
Normal file
36
vendor/github.com/petermattis/goid/runtime_go1.9.go
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// +build go1.9
|
||||
|
||||
package goid
|
||||
|
||||
type stack struct {
|
||||
lo uintptr
|
||||
hi uintptr
|
||||
}
|
||||
|
||||
type gobuf struct {
|
||||
sp uintptr
|
||||
pc uintptr
|
||||
g uintptr
|
||||
ctxt uintptr
|
||||
ret uintptr
|
||||
lr uintptr
|
||||
bp uintptr
|
||||
}
|
||||
|
||||
type g struct {
|
||||
stack stack
|
||||
stackguard0 uintptr
|
||||
stackguard1 uintptr
|
||||
|
||||
_panic uintptr
|
||||
_defer uintptr
|
||||
m uintptr
|
||||
sched gobuf
|
||||
syscallsp uintptr
|
||||
syscallpc uintptr
|
||||
stktopsp uintptr
|
||||
param uintptr
|
||||
atomicstatus uint32
|
||||
stackLock uint32
|
||||
goid int64 // Here it is!
|
||||
}
|
||||
Reference in New Issue
Block a user