mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: support register ABI Go functions from Windows callbacks
This change modifies the system that allows Go functions to be set as callbacks in various Windows systems to support the new register ABI. For #40724. Change-Id: Ie067f9e8a76c96d56177d7aa88f89cbe7223e12e Reviewed-on: https://go-review.googlesource.com/c/go/+/300113 Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
cb42e3e979
commit
44dd06670f
3 changed files with 306 additions and 82 deletions
|
|
@ -1233,7 +1233,9 @@ func (th *TimeHistogram) Record(duration int64) {
|
|||
func SetIntArgRegs(a int) int {
|
||||
lock(&finlock)
|
||||
old := intArgRegs
|
||||
intArgRegs = a
|
||||
if a >= 0 {
|
||||
intArgRegs = a
|
||||
}
|
||||
unlock(&finlock)
|
||||
return old
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue