From 84ded32817e368dc3dd3a2527ecbf94bdd853d14 Mon Sep 17 00:00:00 2001 From: Kai Backman Date: Thu, 2 Jul 2009 22:05:06 -0700 Subject: [PATCH] sys.cas for mutex R=rsc APPROVED=rsc DELTA=28 (28 added, 0 deleted, 0 changed) OCL=31128 CL=31130 --- src/pkg/sync/asm_arm.s | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/pkg/sync/asm_arm.s 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 -- 2.48.1