From: Kai Backman Date: Fri, 3 Jul 2009 05:05:06 +0000 (-0700) Subject: sys.cas for mutex X-Git-Tag: weekly.2009-11-06~1269 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=84ded32817e368dc3dd3a2527ecbf94bdd853d14;p=gostls13.git sys.cas for mutex R=rsc APPROVED=rsc DELTA=28 (28 added, 0 deleted, 0 changed) OCL=31128 CL=31130 --- diff --git a/src/pkg/sync/asm_arm.s b/src/pkg/sync/asm_arm.s new file mode 100644 index 0000000000..a6ad9d949c --- /dev/null +++ b/src/pkg/sync/asm_arm.s @@ -0,0 +1,14 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// func cas(val *int32, old, new int32) bool +// Atomically: +// if *val == old { +// *val = new; +// return true; +// }else +// return false; + +TEXT sync·cas+0(SB),0,$12 + TODO