Home | History | Annotate | Download | only in atomic
      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 runtimeinternalatomicCas(SB),NOSPLIT,$0
     16 	B	runtimeinternalatomicarmcas(SB)
     17 
     18 TEXT runtimeinternalatomicCasp1(SB),NOSPLIT,$0
     19 	B	runtimeinternalatomicCas(SB)
     20