 Chromium Code Reviews
 Chromium Code Reviews Issue 10834431:
  third_party/protobuf should build on the x86_64 architecture  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk
    
  
    Issue 10834431:
  third_party/protobuf should build on the x86_64 architecture  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk| OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ | 
| OLD | NEW |