Skip to content

Commit 01fa550

Browse files
committed
[tsan][test] Switch SIGPROF to SIGALRM
Followup to #85188.
1 parent 047b2b2 commit 01fa550

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/test/tsan/signal_reset.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ static void* reset(void *p) {
2828
struct sigaction act = {};
2929
for (int i = 0; i < 1000000; i++) {
3030
act.sa_handler = &handler;
31-
if (sigaction(SIGPROF, &act, 0)) {
31+
if (sigaction(SIGALRM, &act, 0)) {
3232
perror("sigaction");
3333
exit(1);
3434
}
3535
act.sa_handler = SIG_IGN;
36-
if (sigaction(SIGPROF, &act, 0)) {
36+
if (sigaction(SIGALRM, &act, 0)) {
3737
perror("sigaction");
3838
exit(1);
3939
}
@@ -44,7 +44,7 @@ static void* reset(void *p) {
4444
int main() {
4545
struct sigaction act = {};
4646
act.sa_handler = SIG_IGN;
47-
if (sigaction(SIGPROF, &act, 0)) {
47+
if (sigaction(SIGALRM, &act, 0)) {
4848
perror("sigaction");
4949
exit(1);
5050
}
@@ -53,7 +53,7 @@ int main() {
5353
t.it_value.tv_sec = 0;
5454
t.it_value.tv_usec = 10;
5555
t.it_interval = t.it_value;
56-
if (setitimer(ITIMER_PROF, &t, 0)) {
56+
if (setitimer(ITIMER_REAL, &t, 0)) {
5757
perror("setitimer");
5858
exit(1);
5959
}

0 commit comments

Comments
 (0)