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
c59473d5
Commit
c59473d5
authored
Aug 04, 2016
by
Feng Xiao
Committed by
GitHub
Aug 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1044 from mark-whiting/master
Adding missing generic gcc 64-bit atomicops.
parents
6d134eac
fd1c2898
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
atomicops_internals_generic_gcc.h
src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+18
-0
No files found.
src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
View file @
c59473d5
...
...
@@ -128,6 +128,24 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
return
old_value
;
}
inline
Atomic64
NoBarrier_AtomicIncrement
(
volatile
Atomic64
*
ptr
,
Atomic64
increment
)
{
return
__atomic_add_fetch
(
ptr
,
increment
,
__ATOMIC_RELAXED
);
}
inline
void
NoBarrier_Store
(
volatile
Atomic64
*
ptr
,
Atomic64
value
)
{
__atomic_store_n
(
ptr
,
value
,
__ATOMIC_RELAXED
);
}
inline
Atomic64
NoBarrier_AtomicExchange
(
volatile
Atomic64
*
ptr
,
Atomic64
new_value
)
{
return
__atomic_exchange_n
(
ptr
,
new_value
,
__ATOMIC_RELAXED
);
}
inline
Atomic64
NoBarrier_Load
(
volatile
const
Atomic64
*
ptr
)
{
return
__atomic_load_n
(
ptr
,
__ATOMIC_RELAXED
);
}
#endif // defined(__LP64__)
}
// namespace internal
...
...
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