Follow up to D38826.
We introduce pthread_{get,set}specific versions of {get,set}CurrentTSD to
allow for non Android platforms to use the Shared TSD model.
We now allow SCUDO_TSD_EXCLUSIVE to be defined at compile time.
A couple of things:
- I know that #if SANITIZER_ANDROID is not ideal within a function, but in the end I feel it looks more compact and clean than going the .inc route; I am open to an alternative if anyone has one;
- SCUDO_TSD_EXCLUSIVE=1 requires ELF TLS support (and not emutls as this uses malloc). I haven't found anything to enforce that, so it's currently not checked.
What's going to happen if we define SCUDO_TSD_EXCLUSIVE at compile time on these platforms?