github.com/mattn/go@v0.0.0-20171011075504-07f7db3ea99f/src/runtime/internal/atomic/sys_freebsd_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)