#define NEED_PTHREADS_QUASI_ATOMICS 1
#endif
-#elif defined(__sh__)
-#define NEED_PTHREADS_QUASI_ATOMICS 1
-
#else
#error "Unsupported atomic operations for this platform"
#endif
for (size_t i = 0; i < kSwapLockCount; ++i) {
pthread_mutex_t* m = gSwapLocks[i];
gSwapLocks[i] = NULL;
- dvmDestroyMutex(m);
+ if (m != NULL) {
+ dvmDestroyMutex(m);
+ }
delete m;
}
}