Skip to content

Commit

Permalink
Help make base compile in NaCl.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
abarth@chromium.org committed Dec 1, 2010
1 parent d9d18c7 commit bd254b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/atomicops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bd254b4

Please sign in to comment.