diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-10-12 15:01:09 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-10-12 15:01:09 +0000 |
commit | 389cffef8d650b3dd60e9f76badb083c241fbd0b (patch) | |
tree | 315fe36a577fbc4429384ae0aa46b8bbf60ff6a8 /lib/scudo/scudo_tsd.h | |
parent | 286d9a10aba57923d2a1c193b930580f34f3123b (diff) |
[scudo] Allow for non-Android Shared TSD platforms, part 1
Summary:
This first part just prepares the grounds for part 2 and doesn't add any new
functionality. It mostly consists of small refactors:
- move the `pthread.h` include higher as it will be used in the headers;
- use `errno.h` in `scudo_allocator.cpp` instead of the sanitizer one, update
the `errno` assignments accordingly (otherwise it creates conflicts on some
platforms due to `pthread.h` including `errno.h`);
- introduce and use `getCurrentTSD` and `setCurrentTSD` for the shared TSD
model code;
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: llvm-commits, srhines
Differential Revision: https://reviews.llvm.org/D38826
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_tsd.h')
-rw-r--r-- | lib/scudo/scudo_tsd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/scudo/scudo_tsd.h b/lib/scudo/scudo_tsd.h index 9ee89d399..d78eb496f 100644 --- a/lib/scudo/scudo_tsd.h +++ b/lib/scudo/scudo_tsd.h @@ -19,6 +19,8 @@ #include "scudo_allocator.h" #include "scudo_utils.h" +#include <pthread.h> + namespace __scudo { struct ALIGNED(64) ScudoTSD { |