Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
e7f29379
Commit
e7f29379
authored
May 05, 2014
by
xiaofeng@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug in Arm64 atomicops. (
https://codereview.appspot.com/88800045/
)
parent
3aa5ea95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
atomicops_internals_arm64_gcc.h
src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
+7
-19
No files found.
src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h
View file @
e7f29379
...
...
@@ -117,10 +117,8 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
inline
Atomic32
Barrier_AtomicIncrement
(
volatile
Atomic32
*
ptr
,
Atomic32
increment
)
{
Atomic32
result
;
MemoryBarrier
();
result
=
NoBarrier_AtomicIncrement
(
ptr
,
increment
);
Atomic32
result
=
NoBarrier_AtomicIncrement
(
ptr
,
increment
);
MemoryBarrier
();
return
result
;
...
...
@@ -129,9 +127,7 @@ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
inline
Atomic32
Acquire_CompareAndSwap
(
volatile
Atomic32
*
ptr
,
Atomic32
old_value
,
Atomic32
new_value
)
{
Atomic32
prev
;
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
Atomic32
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
MemoryBarrier
();
return
prev
;
...
...
@@ -140,10 +136,8 @@ inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
inline
Atomic32
Release_CompareAndSwap
(
volatile
Atomic32
*
ptr
,
Atomic32
old_value
,
Atomic32
new_value
)
{
Atomic32
prev
;
MemoryBarrier
();
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
Atomic32
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
return
prev
;
}
...
...
@@ -259,10 +253,8 @@ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
inline
Atomic64
Barrier_AtomicIncrement
(
volatile
Atomic64
*
ptr
,
Atomic64
increment
)
{
Atomic64
result
;
MemoryBarrier
();
result
=
NoBarrier_AtomicIncrement
(
ptr
,
increment
);
Atomic64
result
=
NoBarrier_AtomicIncrement
(
ptr
,
increment
);
MemoryBarrier
();
return
result
;
...
...
@@ -271,9 +263,7 @@ inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
inline
Atomic64
Acquire_CompareAndSwap
(
volatile
Atomic64
*
ptr
,
Atomic64
old_value
,
Atomic64
new_value
)
{
Atomic64
prev
;
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
Atomic64
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
MemoryBarrier
();
return
prev
;
...
...
@@ -282,10 +272,8 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
inline
Atomic64
Release_CompareAndSwap
(
volatile
Atomic64
*
ptr
,
Atomic64
old_value
,
Atomic64
new_value
)
{
Atomic64
prev
;
MemoryBarrier
();
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
Atomic64
prev
=
NoBarrier_CompareAndSwap
(
ptr
,
old_value
,
new_value
);
return
prev
;
}
...
...
@@ -313,7 +301,7 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
}
inline
Atomic64
Acquire_Load
(
volatile
const
Atomic64
*
ptr
)
{
Atomic
32
value
;
Atomic
64
value
;
__asm__
__volatile__
(
// NOLINT
"ldar %x[value], %[ptr]
\n\t
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment