Skip to content

Commit 62333b3

Browse files
author
git apple-llvm automerger
committed
Merge commit '34412cea5c24' from llvm.org/main into next
2 parents 3db6d54 + 34412ce commit 62333b3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compiler-rt/test/tsan/stress.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ void *Thread(void *x) {
5454

5555
int main() {
5656
ANNOTATE_BENIGN_RACE(stop);
57-
if (pipe2(fds, O_NONBLOCK))
58-
exit((perror("pipe2"), 1));
57+
if (pipe(fds))
58+
exit((perror("pipe"), 1));
59+
if (fcntl(fds[0], F_SETFL, O_NONBLOCK))
60+
exit((perror("fcntl"), 1));
61+
if (fcntl(fds[1], F_SETFL, O_NONBLOCK))
62+
exit((perror("fcntl"), 1));
5963
const int kActions = 9;
6064
const int kMultiplier = 4;
6165
pthread_t t[kActions * kMultiplier];

0 commit comments

Comments
 (0)