thread-test: fix deadlock
authorTanu Kaskinen <tanuk@iki.fi>
Mon, 23 Jan 2017 08:38:59 +0000 (10:38 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 26 Jan 2017 05:56:54 +0000 (07:56 +0200)
commit5e1bb023a26ec0486ce6766283caa02a2e18b319
treee61c9317d124fe11d5e2c64127d8eefa94e35a23
parenta50030b6971ee2144f81ff9d3dd372913ad16c7f
thread-test: fix deadlock

If we set magic_number to zero, the code will deadlock, because the
thread that is waiting for us to set magic_number to non-zero will
never progress.

The problem was reported here:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2017-January/027368.html
src/tests/thread-test.c