Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: third_party/protobuf/src/google/protobuf/stubs/atomicops.h

Issue 10834431: third_party/protobuf should build on the x86_64 architecture (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2012 Google Inc. All rights reserved. 2 // Copyright 2012 Google Inc. All rights reserved.
3 // http://code.google.com/p/protobuf/ 3 // http://code.google.com/p/protobuf/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #ifndef GOOGLE_PROTOBUF_NO_THREADSAFETY 57 #ifndef GOOGLE_PROTOBUF_NO_THREADSAFETY
58 58
59 #include <google/protobuf/stubs/platform_macros.h> 59 #include <google/protobuf/stubs/platform_macros.h>
60 60
61 namespace google { 61 namespace google {
62 namespace protobuf { 62 namespace protobuf {
63 namespace internal { 63 namespace internal {
64 64
65 typedef int32 Atomic32; 65 typedef int32 Atomic32;
66 #ifdef GOOGLE_PROTOBUF_ARCH_64_BIT 66 #ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
67 // We need to be able to go between Atomic64 and AtomicWord implicitly. This
68 // means Atomic64 and AtomicWord should be the same type on 64-bit.
69 #if defined(GOOGLE_PROTOBUF_OS_NACL)
70 // NaCl's intptr_t is not actually 64-bits on 64-bit!
71 // http://code.google.com/p/nativeclient/issues/detail?id=1162
72 typedef int64 Atomic64; 67 typedef int64 Atomic64;
73 #else
74 typedef intptr_t Atomic64;
Mark Mentovai 2012/08/21 15:22:04 You are changing this for all platforms, but I thi
75 #endif
76 #endif 68 #endif
77 69
78 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or 70 // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
79 // Atomic64 routines below, depending on your architecture. 71 // Atomic64 routines below, depending on your architecture.
80 typedef intptr_t AtomicWord; 72 typedef intptr_t AtomicWord;
81 73
82 // Atomically execute: 74 // Atomically execute:
83 // result = *ptr; 75 // result = *ptr;
84 // if (*ptr == old_value) 76 // if (*ptr == old_value)
85 // *ptr = new_value; 77 // *ptr = new_value;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // compatible with our other Atomic* types. 185 // compatible with our other Atomic* types.
194 #if defined(GOOGLE_PROTOBUF_OS_APPLE) 186 #if defined(GOOGLE_PROTOBUF_OS_APPLE)
195 #include <google/protobuf/stubs/atomicops_internals_atomicword_compat.h> 187 #include <google/protobuf/stubs/atomicops_internals_atomicword_compat.h>
196 #endif 188 #endif
197 189
198 #undef GOOGLE_PROTOBUF_ATOMICOPS_ERROR 190 #undef GOOGLE_PROTOBUF_ATOMICOPS_ERROR
199 191
200 #endif // GOOGLE_PROTOBUF_NO_THREADSAFETY 192 #endif // GOOGLE_PROTOBUF_NO_THREADSAFETY
201 193
202 #endif // GOOGLE_PROTOBUF_ATOMICOPS_H_ 194 #endif // GOOGLE_PROTOBUF_ATOMICOPS_H_
OLDNEW
« no previous file with comments | « third_party/protobuf/README.chromium ('k') | third_party/protobuf/src/google/protobuf/stubs/platform_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698