Fix __errno for LP64 and clean up __get_tls.
If __get_tls has the right type, a lot of confusing casting can disappear. It was probably a mistake that __get_tls was exposed as a function for mips and x86 (but not arm), so let's (a) ensure that the __get_tls function always matches the macro, (b) that we have the function for arm too, and (c) that we don't have the function for any 64-bit architecture. Change-Id: Ie9cb989b66e2006524ad7733eb6e1a65055463be
This commit is contained in:
@@ -64,6 +64,5 @@ __LIBC_ABI_PRIVATE__ void _pthread_internal_add(pthread_internal_t* thread) {
|
||||
}
|
||||
|
||||
__LIBC_ABI_PRIVATE__ pthread_internal_t* __get_thread(void) {
|
||||
void** tls = reinterpret_cast<void**>(const_cast<void*>(__get_tls()));
|
||||
return reinterpret_cast<pthread_internal_t*>(tls[TLS_SLOT_THREAD_ID]);
|
||||
return reinterpret_cast<pthread_internal_t*>(__get_tls()[TLS_SLOT_THREAD_ID]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user