Mercurial > hg > CbC > CbC_llvm
comparison compiler-rt/test/tsan/signal_sync2.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s | 1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s |
2 // UNSUPPORTED: darwin | 2 // UNSUPPORTED: darwin |
3 #include <pthread.h> | 3 #include "test.h" |
4 #include <stdio.h> | 4 #include <errno.h> |
5 #include <stdlib.h> | |
6 #include <signal.h> | 5 #include <signal.h> |
6 #include <sys/time.h> | |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/time.h> | |
9 #include <unistd.h> | |
10 #include <errno.h> | |
11 | 8 |
12 // Test synchronization in signal handled within IgnoreSync region. | 9 // Test synchronization in signal handled within IgnoreSync region. |
13 | |
14 extern "C" void AnnotateIgnoreSyncBegin(const char *f, int l); | |
15 extern "C" void AnnotateIgnoreSyncEnd(const char *f, int l); | |
16 | 10 |
17 const int kSignalCount = 500; | 11 const int kSignalCount = 500; |
18 | 12 |
19 __thread int process_signals; | 13 __thread int process_signals; |
20 int signals_handled; | 14 int signals_handled; |