| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
#ifndef TSAN_FD_H |
| 34 |
#define TSAN_FD_H |
| 35 |
|
| 36 |
#include "tsan_rtl.h" |
| 37 |
|
| 38 |
namespace __tsan { |
| 39 |
|
| 40 |
void FdInit(); |
| 41 |
void FdAcquire(ThreadState *thr, uptr pc, int fd); |
| 42 |
void FdRelease(ThreadState *thr, uptr pc, int fd); |
| 43 |
void FdAccess(ThreadState *thr, uptr pc, int fd); |
| 44 |
void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); |
| 45 |
void FdFileCreate(ThreadState *thr, uptr pc, int fd); |
| 46 |
void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); |
| 47 |
void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); |
| 48 |
void FdEventCreate(ThreadState *thr, uptr pc, int fd); |
| 49 |
void FdSignalCreate(ThreadState *thr, uptr pc, int fd); |
| 50 |
void FdInotifyCreate(ThreadState *thr, uptr pc, int fd); |
| 51 |
void FdPollCreate(ThreadState *thr, uptr pc, int fd); |
| 52 |
void FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd); |
| 53 |
void FdSocketCreate(ThreadState *thr, uptr pc, int fd); |
| 54 |
void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd); |
| 55 |
void FdSocketConnecting(ThreadState *thr, uptr pc, int fd); |
| 56 |
void FdSocketConnect(ThreadState *thr, uptr pc, int fd); |
| 57 |
bool FdLocation(uptr addr, int *fd, Tid *tid, StackID *stack, bool *closed); |
| 58 |
void FdOnFork(ThreadState *thr, uptr pc); |
| 59 |
|
| 60 |
uptr File2addr(const char *path); |
| 61 |
uptr Dir2addr(const char *path); |
| 62 |
|
| 63 |
} |
| 64 |
|
| 65 |
#endif |