Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[official-gcc.git] / libsanitizer / lsan / lsan_linux.cpp
blob5074cee1296a81fb0d15a0e55e22c1deddb4feb3
1 //=-- lsan_linux.cpp ------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of LeakSanitizer. Linux/NetBSD/Fuchsia-specific code.
11 //===----------------------------------------------------------------------===//
13 #include "sanitizer_common/sanitizer_platform.h"
15 #if SANITIZER_LINUX || SANITIZER_NETBSD || SANITIZER_FUCHSIA
17 # include "lsan_allocator.h"
18 # include "lsan_thread.h"
20 namespace __lsan {
22 static THREADLOCAL ThreadContextLsanBase *current_thread = nullptr;
23 ThreadContextLsanBase *GetCurrentThread() { return current_thread; }
24 void SetCurrentThread(ThreadContextLsanBase *tctx) { current_thread = tctx; }
26 static THREADLOCAL AllocatorCache allocator_cache;
27 AllocatorCache *GetAllocatorCache() { return &allocator_cache; }
29 void ReplaceSystemMalloc() {}
31 } // namespace __lsan
33 #endif // SANITIZER_LINUX || SANITIZER_NETBSD || SANITIZER_FUCHSIA