Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: src/pkg/sync/atomic/64bit_linux_arm.go

Issue 6490119: all: FreeBSD/ARM w/ cgo port (Closed)
Patch Set: diff -r cfa9208b98fc http://go.googlecode.com/hg/ Created 12 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/sync/atomic/64bit_arm.go ('k') | src/pkg/sync/atomic/asm_freebsd_arm.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 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 package atomic
6
7 func loadUint64(addr *uint64) (val uint64) {
8 for {
9 val = *addr
10 if CompareAndSwapUint64(addr, val, val) {
11 break
12 }
13 }
14 return
15 }
16
17 func storeUint64(addr *uint64, val uint64) {
18 for {
19 old := *addr
20 if CompareAndSwapUint64(addr, old, val) {
21 break
22 }
23 }
24 return
25 }
26
27 func addUint64(val *uint64, delta uint64) (new uint64) {
28 for {
29 old := *val
30 new = old + delta
31 if CompareAndSwapUint64(val, old, new) {
32 break
33 }
34 }
35 return
36 }
OLDNEW
« no previous file with comments | « src/pkg/sync/atomic/64bit_arm.go ('k') | src/pkg/sync/atomic/asm_freebsd_arm.s » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b