diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2014-10-15 05:38:49 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2014-10-15 05:38:49 +0000 |
commit | fadc5a0b744b3f95c145ca4a2f1c02282c109010 (patch) | |
tree | 29335b010abcee3e9fd8b60a674f78c7406601a2 /lib | |
parent | d4216f1b42dd1d0c473177f407d40afbc5647e77 (diff) |
tsan: remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tsan/rtl/tsan_interceptors.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/lib/tsan/rtl/tsan_interceptors.cc b/lib/tsan/rtl/tsan_interceptors.cc index 6a38dafdb..0fbd77534 100644 --- a/lib/tsan/rtl/tsan_interceptors.cc +++ b/lib/tsan/rtl/tsan_interceptors.cc @@ -284,66 +284,6 @@ TSAN_INTERCEPTOR(int, nanosleep, void *req, void *rem) { return res; } -/* -class AtExitContext { - public: - AtExitContext() - : mtx_(MutexTypeAtExit, StatMtxAtExit) - , stack_(MBlockAtExit) { - } - - typedef void(*atexit_cb_t)(); - - int atexit(ThreadState *thr, uptr pc, bool is_on_exit, - atexit_cb_t f, void *arg, void *dso) { - Lock l(&mtx_); - Release(thr, pc, (uptr)this); - atexit_t *a = stack_.PushBack(); - a->cb = f; - a->arg = arg; - a->dso = dso; - a->is_on_exit = is_on_exit; - return 0; - } - - void exit(ThreadState *thr, uptr pc) { - for (;;) { - atexit_t a = {}; - { - Lock l(&mtx_); - if (stack_.Size() != 0) { - a = stack_[stack_.Size() - 1]; - stack_.PopBack(); - Acquire(thr, pc, (uptr)this); - } - } - if (a.cb == 0) - break; - VPrintf(2, "#%d: executing atexit func %p(%p) dso=%p\n", - thr->tid, a.cb, a.arg, a.dso); - if (a.is_on_exit) - ((void(*)(int status, void *arg))a.cb)(0, a.arg); - else - ((void(*)(void *arg, void *dso))a.cb)(a.arg, a.dso); - } - } - - private: - struct atexit_t { - atexit_cb_t cb; - void *arg; - void *dso; - bool is_on_exit; - }; - - static const int kMaxAtExit = 1024; - Mutex mtx_; - Vector<atexit_t> stack_; -}; - -static AtExitContext *atexit_ctx; -*/ - // The sole reason tsan wraps atexit callbacks is to establish synchronization // between callback setup and callback execution. struct AtExitCtx { |