github.com/zebozhuang/go@v0.0.0-20200207033046-f8a98f6f5c5d/src/runtime/internal/atomic/sys_netbsd_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 #include "textflag.h" 6 7 // TODO(minux): this is only valid for ARMv6+ 8 // bool Armcas(int32 *val, int32 old, int32 new) 9 // Atomically: 10 // if(*val == old){ 11 // *val = new; 12 // return 1; 13 // }else 14 // return 0; 15 TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0 16 B runtime∕internal∕atomic·armcas(SB) 17 18 TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0 19 B runtime∕internal∕atomic·Cas(SB) 20 21