When trying to build EAThread using the 64 bit compilers from the NDK, I get the following errors:
In file included from ../../library/eaoss/src/EAThread/eathread.cpp:89:
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:37:26: error: cast from pointer to smaller type 'unsigned int' loses information
pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
^~~~~~~~~~~~~~~~~~~
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
#define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
^~~~~~~~~~~~~~~~~~~~~~~
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:52:26: error: cast from pointer to smaller type 'unsigned int' loses information
pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
^~~~~~~~~~~~~~~~~~~
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
#define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
^~~~~~~~~~~~~~~~~~~~~~~
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:73:26: error: cast from pointer to smaller type 'unsigned int' loses information
pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
^~~~~~~~~~~~~~~~~~~
../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
#define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
^~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
Changing that macro to use unsigned long for 64 bit builds eliminates the error, but I'm not sure if that will break functionality since it's not clear to me what that macro is doing.
When trying to build EAThread using the 64 bit compilers from the NDK, I get the following errors:
Changing that macro to use
unsigned longfor 64 bit builds eliminates the error, but I'm not sure if that will break functionality since it's not clear to me what that macro is doing.