This is a request for comment, not an actual patch submission.
I would like to get some reviewers feedback on a refactoring of how the thread
specific data is handled in Scudo. The Linux or Android distinction is too
narrow and can't be sensically extanded to other platforms.
The core of the idea is to not make this distinction anymore, but to introduce
a shared TSD model (N caches shared between threads, locking) vs an exclusive
TSD model (1 cache per thread, no locking required). This would allow for easy
platform inclusions, as demonstrated with the addition of Fuchsia here. The
model could ultimately be specified via defines as opposed to be set in stone
for a given platform (eg: we could do shared caches on Linux).
While the code included works, it's merely for demonstration purposes. The
previous organization involved .inc files per platform, which I am not opposed
to do again but felt cumbersome to deal with. I am looking for comments,
suggestions, ideas regarding code organization, naming, so that this refactoring
would make sense to others.
Thanks in advance!
This and getPrng look unnecessary now.