summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/tsan/fiber_simple.cc
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2019-02-13 11:32:56 +0000
committerDiana Picus <diana.picus@linaro.org>2019-02-13 11:32:56 +0000
commit4152a09e553768b3110c7c753000b40a29a23b1e (patch)
tree543b750d665154832b0be3aa2cc18867549a3953 /compiler-rt/test/tsan/fiber_simple.cc
parentaa4118a8738eec74e953c14db14fccba3471e6c5 (diff)
downloadbcm5719-llvm-4152a09e553768b3110c7c753000b40a29a23b1e.tar.gz
bcm5719-llvm-4152a09e553768b3110c7c753000b40a29a23b1e.zip
Revert "tsan: add fiber support"
This reverts commit r353817 because we think it broke AARch64 and PowerPC buildbots. llvm-svn: 353939
Diffstat (limited to 'compiler-rt/test/tsan/fiber_simple.cc')
-rw-r--r--compiler-rt/test/tsan/fiber_simple.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/compiler-rt/test/tsan/fiber_simple.cc b/compiler-rt/test/tsan/fiber_simple.cc
deleted file mode 100644
index ce529e7299d..00000000000
--- a/compiler-rt/test/tsan/fiber_simple.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
-// UNSUPPORTED: darwin
-#include "test.h"
-#include <ucontext.h>
-
-char stack[64 * 1024] __attribute__((aligned(16)));
-
-ucontext_t uc, orig_uc;
-void *fiber, *orig_fiber;
-
-int var;
-
-void func() {
- var = 1;
- __tsan_switch_to_fiber(orig_fiber, 0);
- swapcontext(&uc, &orig_uc);
-}
-
-int main() {
- orig_fiber = __tsan_get_current_fiber();
- fiber = __tsan_create_fiber(0);
- getcontext(&uc);
- uc.uc_stack.ss_sp = stack;
- uc.uc_stack.ss_size = sizeof(stack);
- uc.uc_link = 0;
- makecontext(&uc, func, 0);
- var = 2;
- __tsan_switch_to_fiber(fiber, 0);
- swapcontext(&orig_uc, &uc);
- __tsan_destroy_fiber(fiber);
- fprintf(stderr, "PASS\n");
- return 0;
-}
-
-// CHECK-NOT: WARNING: ThreadSanitizer:
-// CHECK: PASS
OpenPOWER on IntegriCloud