summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authorDaan <daanl@outlook.com>2021-12-15 16:05:07 -0800
committerDaan <daanl@outlook.com>2021-12-15 16:05:07 -0800
commit523e6d5c9b251bc8d969a685b2b6feda6fd1f8ab (patch)
tree7b1ce3ac183ca0566c43f432f62865dee925f6b5 /include/mimalloc-internal.h
parent144b4a2d3e1535634b5e8a5d12fa9e64e44dadbd (diff)
fix thread slot on arm32 (issue #495)
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index 4713a75..324ad4a 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -766,8 +766,8 @@ static inline void mi_tls_slot_set(size_t slot, void* value) mi_attr_noexcept {
}
static inline mi_threadid_t _mi_thread_id(void) mi_attr_noexcept {
-#if defined(__BIONIC__) && (defined(__arm__) || defined(__aarch64__))
- // on Android, slot 1 is the thread ID (pointer to pthread internal struct)
+#if defined(__arm__) || (defined(__BIONIC__) && defined(__aarch64__))
+ // issue #384, #495: on arm32 and arm32/arm64 Android, slot 1 is the thread ID (pointer to pthread internal struct)
return (uintptr_t)mi_tls_slot(1);
#else
// in all our other targets, slot 0 is the pointer to the thread control block