blob: 5e57d2b4d1d66225d95372659bf3aef3f952211f [file] [log] [blame]
Dmitry Vyukov9190a032012-12-12 12:27:00 +00001//===-- tsan_fd.h -----------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file is a part of ThreadSanitizer (TSan), a race detector.
11//
12//===----------------------------------------------------------------------===//
13#ifndef TSAN_FD_H
14#define TSAN_FD_H
15
16#include "tsan_rtl.h"
17
18namespace __tsan {
19
20void FdInit();
21void FdAcquire(ThreadState *thr, uptr pc, int fd);
22void FdRelease(ThreadState *thr, uptr pc, int fd);
23void FdClose(ThreadState *thr, uptr pc, int fd);
24void FdFileCreate(ThreadState *thr, uptr pc, int fd);
25void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd);
26void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd);
27void FdEventCreate(ThreadState *thr, uptr pc, int fd);
28void FdPollCreate(ThreadState *thr, uptr pc, int fd);
29void FdSocketCreate(ThreadState *thr, uptr pc, int fd);
30void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
31void FdSocketConnect(ThreadState *thr, uptr pc, int fd);
32
33uptr File2addr(char *path);
34uptr Dir2addr(char *path);
35
36} // namespace __tsan
37
38#endif // TSAN_INTERFACE_H