mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
AARCH64:fix variable name collision with register name
The variable name is g which is collision with the reserved name for R28. This leads to bazel build failure on ARM with following information: (register+register) not supported on this architecture rename it from g to ptr (referenced from golang source code) Signed-off-by: Howard Zhang <howard.zhang@arm.com>
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
|
||||
// See waiter_noasm_unsafe.go for a description of waiterUnlock.
|
||||
//
|
||||
// func waiterUnlock(g unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
// func waiterUnlock(ptr unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
TEXT ·waiterUnlock(SB),NOSPLIT,$0-24
|
||||
MOVQ g+0(FP), DI
|
||||
MOVQ ptr+0(FP), DI
|
||||
MOVQ wg+8(FP), SI
|
||||
|
||||
MOVQ $·preparingG(SB), AX
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
// See waiter_noasm_unsafe.go for a description of waiterUnlock.
|
||||
//
|
||||
// func waiterUnlock(g unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
// func waiterUnlock(ptr unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
TEXT ·waiterUnlock(SB),NOSPLIT,$0-24
|
||||
MOVD wg+8(FP), R0
|
||||
MOVD $·preparingG(SB), R1
|
||||
MOVD g+0(FP), R2
|
||||
MOVD ptr+0(FP), R2
|
||||
again:
|
||||
LDAXR (R0), R3
|
||||
CMP R1, R3
|
||||
|
||||
@@ -21,4 +21,4 @@ import (
|
||||
)
|
||||
|
||||
// See waiter_noasm_unsafe.go for a description of waiterUnlock.
|
||||
func waiterUnlock(g unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
func waiterUnlock(ptr unsafe.Pointer, wg *unsafe.Pointer) bool
|
||||
|
||||
@@ -32,8 +32,8 @@ import (
|
||||
// should be aborted.
|
||||
//
|
||||
//go:nosplit
|
||||
func waiterUnlock(g unsafe.Pointer, wg *unsafe.Pointer) bool {
|
||||
func waiterUnlock(ptr unsafe.Pointer, wg *unsafe.Pointer) bool {
|
||||
// The only way this CAS can fail is if a call to Waiter.NotifyPending()
|
||||
// has replaced *wg with nil, in which case we should not sleep.
|
||||
return atomic.CompareAndSwapPointer(wg, (unsafe.Pointer)(&preparingG), g)
|
||||
return atomic.CompareAndSwapPointer(wg, (unsafe.Pointer)(&preparingG), ptr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user