summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-10-15 05:38:49 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-10-15 05:38:49 +0000
commitf03e719f23c85d2500c5d34f4f39cbfe664ed19c (patch)
tree6da83131d9d6123f8e4d63be34dbee7f61febdfc /compiler-rt
parentf179420c57a2fc9d31a74b6531ef17d97091c622 (diff)
downloadbcm5719-llvm-f03e719f23c85d2500c5d34f4f39cbfe664ed19c.tar.gz
bcm5719-llvm-f03e719f23c85d2500c5d34f4f39cbfe664ed19c.zip
tsan: remove dead code
llvm-svn: 219779
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_interceptors.cc60
1 files changed, 0 insertions, 60 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
index 6a38dafdbb9..0fbd77534b1 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
+++ b/compiler-rt/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 {
OpenPOWER on IntegriCloud