llvm/compiler-rt/lib/tsan/rtl/tsan_fd.cpp

//===-- tsan_fd.cpp -------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of ThreadSanitizer (TSan), a race detector.
//
//===----------------------------------------------------------------------===//

#include "tsan_fd.h"

#include <sanitizer_common/sanitizer_atomic.h>

#include "tsan_interceptors.h"
#include "tsan_rtl.h"

namespace __tsan {

const int kTableSizeL1 =;
const int kTableSizeL2 =;
const int kTableSize =;

struct FdSync {};

struct FdDesc {};

struct FdContext {};

static FdContext fdctx;

static bool bogusfd(int fd) {}

static FdSync *allocsync(ThreadState *thr, uptr pc) {}

static FdSync *ref(FdSync *s) {}

static void unref(ThreadState *thr, uptr pc, FdSync *s) {}

static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) {}

// pd must be already ref'ed.
static void init(ThreadState *thr, uptr pc, int fd, FdSync *s,
    bool write = true) {}

void FdInit() {}

void FdOnFork(ThreadState *thr, uptr pc) {}

bool FdLocation(uptr addr, int *fd, Tid *tid, StackID *stack, bool *closed) {}

void FdAcquire(ThreadState *thr, uptr pc, int fd) {}

void FdRelease(ThreadState *thr, uptr pc, int fd) {}

void FdAccess(ThreadState *thr, uptr pc, int fd) {}

void FdClose(ThreadState *thr, uptr pc, int fd, bool write) {}

void FdFileCreate(ThreadState *thr, uptr pc, int fd) {}

void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) {}

void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd) {}

void FdEventCreate(ThreadState *thr, uptr pc, int fd) {}

void FdSignalCreate(ThreadState *thr, uptr pc, int fd) {}

void FdInotifyCreate(ThreadState *thr, uptr pc, int fd) {}

void FdPollCreate(ThreadState *thr, uptr pc, int fd) {}

void FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd) {}

void FdSocketCreate(ThreadState *thr, uptr pc, int fd) {}

void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) {}

void FdSocketConnecting(ThreadState *thr, uptr pc, int fd) {}

void FdSocketConnect(ThreadState *thr, uptr pc, int fd) {}

uptr File2addr(const char *path) {}

uptr Dir2addr(const char *path) {}

}  //  namespace __tsan