summaryrefslogtreecommitdiffhomepage
path: root/pkg/syncevent/waiter_noasm_unsafe.go
diff options
context:
space:
mode:
authorHoward Zhang <howard.zhang@arm.com>2020-07-30 18:43:01 +0800
committerHoward Zhang <howard.zhang@arm.com>2020-08-03 16:38:51 +0800
commitb9a49f2065732fb4ae27d24ec05e59c4ae09adb4 (patch)
tree447536ec4ac0d43abc03c9d9f91700f42a958833 /pkg/syncevent/waiter_noasm_unsafe.go
parentba2bf9fc13c204ad05d9fbb7199b890e6faf1d76 (diff)
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>
Diffstat (limited to 'pkg/syncevent/waiter_noasm_unsafe.go')
-rw-r--r--pkg/syncevent/waiter_noasm_unsafe.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/syncevent/waiter_noasm_unsafe.go b/pkg/syncevent/waiter_noasm_unsafe.go
index 1c4b0e39a..0f74a689c 100644
--- a/pkg/syncevent/waiter_noasm_unsafe.go
+++ b/pkg/syncevent/waiter_noasm_unsafe.go
@@ -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)
}