summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_tsd_exclusive.inc')
-rw-r--r--compiler-rt/lib/scudo/scudo_tsd_exclusive.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc b/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc
index 567b6a1edd1..1fa9dcdfd20 100644
--- a/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc
+++ b/compiler-rt/lib/scudo/scudo_tsd_exclusive.inc
@@ -35,11 +35,13 @@ ALWAYS_INLINE void initThreadMaybe(bool MinimalInit = false) {
initThread(MinimalInit);
}
-ALWAYS_INLINE ScudoTSD *getTSDAndLock() {
+ALWAYS_INLINE ScudoTSD *getTSDAndLock(bool *UnlockRequired) {
if (UNLIKELY(ScudoThreadState != ThreadInitialized)) {
FallbackTSD.lock();
+ *UnlockRequired = true;
return &FallbackTSD;
}
+ *UnlockRequired = false;
return &TSD;
}
OpenPOWER on IntegriCloud