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
ccb6b622
Commit
ccb6b622
authored
Aug 10, 2017
by
Feng Xiao
Committed by
GitHub
Aug 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3480 from bklarson/master
Clean up typedefs for Atomic32/Atomic64
parents
35db2675
1b423474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
21 deletions
+14
-21
atomicops.h
src/google/protobuf/stubs/atomicops.h
+14
-21
No files found.
src/google/protobuf/stubs/atomicops.h
View file @
ccb6b622
...
...
@@ -63,28 +63,21 @@ namespace google {
namespace
protobuf
{
namespace
internal
{
#if defined(GOOGLE_PROTOBUF_ARCH_POWER)
#if defined(_LP64) || defined(__LP64__)
typedef
int32
Atomic32
;
typedef
intptr_t
Atomic64
;
#ifdef GOOGLE_PROTOBUF_ARCH_32_BIT
typedef
intptr_t
Atomic32
;
typedef
int64
Atomic64
;
#else
typedef
intptr_t
Atomic32
;
typedef
int64
Atomic64
;
#endif
#else
typedef
int32
Atomic32
;
#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL)
// NaCl's intptr_t is not actually 64-bits on 64-bit!
// http://code.google.com/p/nativeclient/issues/detail?id=1162
// sparcv9's pointer type is 32bits
typedef
int64
Atomic64
;
#else
typedef
intptr_t
Atomic64
;
#endif
#endif
typedef
int32
Atomic32
;
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL)
// NaCl's intptr_t is not actually 64-bits on 64-bit!
// http://code.google.com/p/nativeclient/issues/detail?id=1162
// sparcv9's pointer type is 32bits
typedef
int64
Atomic64
;
#else
typedef
intptr_t
Atomic64
;
#endif
#endif
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
...
...
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