Skip to content
Commit acbb4fcd authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: increase max number of threads supported by test-only barrier

Currently the barrier supports only 256 threads,
this does not allow to write reliable tests that use more threads.
Bump max number of threads to 1024 to support writing
good stress tests.
Also replace sched_yield() with usleep(100) on the wait path.
If we write tests that create hundreds of threads (and dozens
of tests can run in parallel), yield would consume massive
amounts of CPU time for spinning.

Depends on D106952.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D106953
parent 9ef9d01a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment