diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 07:34:58 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 07:34:58 +0000 |
commit | bd254b491ec6815e0a2cf7526aab3e71a6edb93b (patch) | |
tree | cb06500c39ec43edccd2f5ae080400a2b42ca541 /base/atomicops.h | |
parent | d9d18c7f147c4bb7329dcb5541c8cb9346477a0a (diff) | |
download | chromium_src-bd254b491ec6815e0a2cf7526aab3e71a6edb93b.zip chromium_src-bd254b491ec6815e0a2cf7526aab3e71a6edb93b.tar.gz chromium_src-bd254b491ec6815e0a2cf7526aab3e71a6edb93b.tar.bz2 |
Help make base compile in NaCl.
Turns out intptr_t isn't 64 bits wide in 64-bit NaCl. This class assumes that
Atomic64 is actually 64 bits wide, so we need to use the int64_t type instead.
Original patch by Eric Seidel.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/atomicops.h')
-rw-r--r-- | base/atomicops.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/atomicops.h b/base/atomicops.h index cf2f2bb..445696b 100644 --- a/base/atomicops.h +++ b/base/atomicops.h @@ -43,8 +43,14 @@ typedef __w64 int32 Atomic32; #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. +#if defined(OS_NACL) +// NaCl's intptr_t is not actually 64-bits on 64-bit! +// http://code.google.com/p/nativeclient/issues/detail?id=1162 +typedef int64_t Atomic64; +#else typedef intptr_t Atomic64; #endif +#endif // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or // Atomic64 routines below, depending on your architecture. |