Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Android & ARM64: FEATURE_EMULATED_TLS #8323

Merged
merged 4 commits into from
Sep 14, 2020
Merged

Conversation

RalfKornmannEnvision
Copy link
Contributor

Android on ARM64 doesn't follow the recommended way how to implement Thread Local Storage (TLS). Instead they are using a custom solution when a __thread variable is used. This solution requires that internally always a C function needs to be called when a TLS variable is access. While the compiler and linker take care of all the c/c++ code the helper code written in assembler needs to be modified. 

This implements the changes for the current thread and thunks data TLS variable. It would work on systems that follow the recommended implementation, too. But as it has a larger overhead compared to the current inlined solution it needs to be activated for systems with this issue by using FEATURE_EMULATED_TLS

Android on ARM64 doesn't follow the recommended way how to implement Thread Local Storage (TLS). Instead they are using a custom solution when a __thread variable is used. This solution requires that internally always a C function needs to be called when a TLS variable is access. While the compiler and linker take care of all the c/c++ code the helper code written in assembler needs to be modified. 

This implements the changes for the current thread and thunks data TLS variable. It would work on systems that follow the recommended implementation, too. But as it has a larger overhead compared to the current inlined solution it needs to be activated for systems with this issue by using FEATURE_EMULATED_TLS
@jkotas jkotas merged commit a3b38d5 into dotnet:master Sep 14, 2020
@jkotas
Copy link
Member

jkotas commented Sep 14, 2020

Thanks

RalfKornmannEnvision added a commit to RalfKornmannEnvision/corert that referenced this pull request Sep 14, 2020
* Android & ARM64: FEATURE_EMULATED_TLS (dotnet#8323)

Android on ARM64 doesn't follow the recommended way how to implement Thread Local Storage (TLS). Instead they are using a custom solution when a __thread variable is used. This solution requires that internally always a C function needs to be called when a TLS variable is access. While the compiler and linker take care of all the c/c++ code the helper code written in assembler needs to be modified. 

This implements the changes for the current thread and thunks data TLS variable. It would work on systems that follow the recommended implementation, too. But as it has a larger overhead compared to the current inlined solution it needs to be activated for systems with this issue by using FEATURE_EMULATED_TLS

* Fix removefeature:Globalization

- Fix for the name of the libary that is used to remove the dependency to the native code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants