github.com/corona10/go@v0.0.0-20180224231303-7a218942be57/src/runtime/internal/atomic/sys_nonlinux_arm.s (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build !linux,arm 6 7 #include "textflag.h" 8 9 // TODO(minux): this is only valid for ARMv6+ 10 // bool armcas(int32 *val, int32 old, int32 new) 11 // Atomically: 12 // if(*val == old){ 13 // *val = new; 14 // return 1; 15 // }else 16 // return 0; 17 TEXT ·Cas(SB),NOSPLIT,$0 18 JMP ·armcas(SB) 19 20 TEXT ·Casp1(SB),NOSPLIT,$0 21 JMP ·Cas(SB)