diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-27 21:17:23 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-27 21:17:23 +0000 |
commit | 616f9a1ec13b57aa1d6ca18a2b919cdaed41764a (patch) | |
tree | d252135ac55ccd9be85efbc945bb21b20fa230e9 /base/atomicops.h | |
parent | 6a97494def7709561e5874c53e797243c95cb7d5 (diff) | |
download | chromium_src-616f9a1ec13b57aa1d6ca18a2b919cdaed41764a.zip chromium_src-616f9a1ec13b57aa1d6ca18a2b919cdaed41764a.tar.gz chromium_src-616f9a1ec13b57aa1d6ca18a2b919cdaed41764a.tar.bz2 |
Some base/ progress towards building on Linux x86-64.
- Use long for int64 (still 64 bits) to avoid annoying nspr clash.
- Fix some incorrect define guards and add some functions to atomicops.
Review URL: http://codereview.chromium.org/159428
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/atomicops.h')
-rw-r--r-- | base/atomicops.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/atomicops.h b/base/atomicops.h index 728b39b..e8de374 100644 --- a/base/atomicops.h +++ b/base/atomicops.h @@ -39,8 +39,10 @@ namespace subtle { #define __w64 #endif typedef __w64 int32 Atomic32; -#ifdef CPU_ARCH_64_BITS -typedef int64 Atomic64; +#ifdef ARCH_CPU_64_BITS +// 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. +typedef intptr_t Atomic64; #endif // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or @@ -98,7 +100,7 @@ Atomic32 Acquire_Load(volatile const Atomic32* ptr); Atomic32 Release_Load(volatile const Atomic32* ptr); // 64-bit atomic operations (only available on 64-bit processors). -#ifdef CPU_ARCH_64_BITS +#ifdef ARCH_CPU_64_BITS Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, Atomic64 old_value, Atomic64 new_value); @@ -118,7 +120,7 @@ void Release_Store(volatile Atomic64* ptr, Atomic64 value); Atomic64 NoBarrier_Load(volatile const Atomic64* ptr); Atomic64 Acquire_Load(volatile const Atomic64* ptr); Atomic64 Release_Load(volatile const Atomic64* ptr); -#endif // CPU_ARCH_64_BITS +#endif // ARCH_CPU_64_BITS } // namespace base::subtle } // namespace base |