summaryrefslogtreecommitdiff
path: root/libsanitizer/tsan/tsan_printf.cc
diff options
context:
space:
mode:
authorkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-23 14:46:25 +0000
committerkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-23 14:46:25 +0000
commit0d996a11d9b5be7a52d77016de51910146ceaa90 (patch)
treea354102cd1c27b09eefe0b04f517d4ecac5bc566 /libsanitizer/tsan/tsan_printf.cc
parenta46419387192ae39f45cfeca2ec0afe6f872956e (diff)
downloadgcc-0d996a11d9b5be7a52d77016de51910146ceaa90.tar.gz
[libsanitizer] merge from upstream r168514
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/tsan/tsan_printf.cc')
-rw-r--r--libsanitizer/tsan/tsan_printf.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/libsanitizer/tsan/tsan_printf.cc b/libsanitizer/tsan/tsan_printf.cc
deleted file mode 100644
index 982e2925dc3..00000000000
--- a/libsanitizer/tsan/tsan_printf.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- tsan_printf.cc ----------------------------------------------------===//
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file is a part of ThreadSanitizer (TSan), a race detector.
-//
-//===----------------------------------------------------------------------===//
-
-#include "sanitizer_common/sanitizer_common.h"
-#include "sanitizer_common/sanitizer_libc.h"
-#include "tsan_defs.h"
-#include "tsan_mman.h"
-#include "tsan_platform.h"
-
-#include <stdarg.h> // va_list
-
-namespace __sanitizer {
-int VSNPrintf(char *buff, int buff_length, const char *format, va_list args);
-} // namespace __sanitizer
-
-namespace __tsan {
-
-void TsanPrintf(const char *format, ...) {
- ScopedInRtl in_rtl;
- const uptr kMaxLen = 16 * 1024;
- InternalScopedBuffer<char> buffer(kMaxLen);
- va_list args;
- va_start(args, format);
- uptr len = VSNPrintf(buffer.data(), buffer.size(), format, args);
- va_end(args);
- internal_write(CTX() ? flags()->log_fileno : 2,
- buffer.data(), len < buffer.size() ? len : buffer.size() - 1);
-}
-
-} // namespace __tsan