1 //===-- xray_utils.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of XRay, a dynamic runtime instrumentation system.
12 // Some shared utilities for the XRay runtime implementation.
14 //===----------------------------------------------------------------------===//
18 #include <sys/types.h>
23 // Default implementation of the reporting interface for sanitizer errors.
24 void printToStdErr(const char *Buffer);
26 // EINTR-safe write routine, provided a file descriptor and a character range.
27 void retryingWriteAll(int Fd, char *Begin, char *End);
29 // Reads a long long value from a provided file.
30 bool readValueFromFile(const char *Filename, long long *Value);
32 // EINTR-safe read routine, providing a file descriptor and a character range.
33 std::pair<ssize_t, bool> retryingReadSome(int Fd, char *Begin, char *End);
35 // EINTR-safe open routine, uses flag-provided values for initialising a log
41 #endif // XRAY_UTILS_H