[compiler-rt] 01fa550 - [tsan][test] Switch SIGPROF to SIGALRM
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 15:45:23 PDT 2024
Author: Vitaly Buka
Date: 2024-03-15T15:44:15-07:00
New Revision: 01fa550ff654d6724e6da54c877032baeddff14b
URL: https://github.com/llvm/llvm-project/commit/01fa550ff654d6724e6da54c877032baeddff14b
DIFF: https://github.com/llvm/llvm-project/commit/01fa550ff654d6724e6da54c877032baeddff14b.diff
LOG: [tsan][test] Switch SIGPROF to SIGALRM
Followup to #85188.
Added:
Modified:
compiler-rt/test/tsan/signal_reset.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/tsan/signal_reset.cpp b/compiler-rt/test/tsan/signal_reset.cpp
index 82758d882382f6..d76b7e5f3b5f70 100644
--- a/compiler-rt/test/tsan/signal_reset.cpp
+++ b/compiler-rt/test/tsan/signal_reset.cpp
@@ -28,12 +28,12 @@ static void* reset(void *p) {
struct sigaction act = {};
for (int i = 0; i < 1000000; i++) {
act.sa_handler = &handler;
- if (sigaction(SIGPROF, &act, 0)) {
+ if (sigaction(SIGALRM, &act, 0)) {
perror("sigaction");
exit(1);
}
act.sa_handler = SIG_IGN;
- if (sigaction(SIGPROF, &act, 0)) {
+ if (sigaction(SIGALRM, &act, 0)) {
perror("sigaction");
exit(1);
}
@@ -44,7 +44,7 @@ static void* reset(void *p) {
int main() {
struct sigaction act = {};
act.sa_handler = SIG_IGN;
- if (sigaction(SIGPROF, &act, 0)) {
+ if (sigaction(SIGALRM, &act, 0)) {
perror("sigaction");
exit(1);
}
@@ -53,7 +53,7 @@ int main() {
t.it_value.tv_sec = 0;
t.it_value.tv_usec = 10;
t.it_interval = t.it_value;
- if (setitimer(ITIMER_PROF, &t, 0)) {
+ if (setitimer(ITIMER_REAL, &t, 0)) {
perror("setitimer");
exit(1);
}
More information about the llvm-commits
mailing list