117192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov//===-- tsan_platform_windows.cc ------------------------------------------===// 217192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// 317192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// The LLVM Compiler Infrastructure 417192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// 517192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// This file is distributed under the University of Illinois Open Source 617192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// License. See LICENSE.TXT for details. 717192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// 817192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov//===----------------------------------------------------------------------===// 917192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// 1017192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// This file is a part of ThreadSanitizer (TSan), a race detector. 1117192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// 1217192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov// Windows-specific code. 1317192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov//===----------------------------------------------------------------------===// 1417192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 1524e13723f8477d8c42ab8b2a7f4f69fc089842f1Evgeniy Stepanov#include "sanitizer_common/sanitizer_platform.h" 1630e110edf92303237d471f1cb8e3ad07954fb145Evgeniy Stepanov#if SANITIZER_WINDOWS 1717192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 1817192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov#include "tsan_platform.h" 1917192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 2017192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov#include <stdlib.h> 2117192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 2217192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukovnamespace __tsan { 2317192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 2417192a77e1296f0e2fe63088bf80778942121c92Dmitry VyukovScopedInRtl::ScopedInRtl() { 2517192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 2617192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 2717192a77e1296f0e2fe63088bf80778942121c92Dmitry VyukovScopedInRtl::~ScopedInRtl() { 2817192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 2917192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 3017192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukovuptr GetShadowMemoryConsumption() { 3117192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov return 0; 3217192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 3317192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 3417192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukovvoid FlushShadowMemory() { 3517192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 3617192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 3717192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukovconst char *InitializePlatform() { 38ce44055cdde85554aa9d18f8a7166bf5df6f9bb3Kostya Serebryany return GetEnv(kTsanOptionsEnv); 3917192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 4017192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 4117192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukovvoid FinalizePlatform() { 4217192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov fflush(0); 4317192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} 4417192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 4517192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov} // namespace __tsan 4617192a77e1296f0e2fe63088bf80778942121c92Dmitry Vyukov 4730e110edf92303237d471f1cb8e3ad07954fb145Evgeniy Stepanov#endif // SANITIZER_WINDOWS 48