diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-02-22 22:07:50 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-22 22:07:50 -0500 |
commit | 8741ffe625363a553e8f509dc3ca7b071bdbab47 (patch) | |
tree | f917a4e8ce76450e2e956b051912cb9861fd9701 /src/thread/__set_thread_area.c | |
parent | 102f6a01e249ce4495f1119ae6d963a2a4a53ce5 (diff) | |
download | musl-8741ffe625363a553e8f509dc3ca7b071bdbab47.tar.gz musl-8741ffe625363a553e8f509dc3ca7b071bdbab47.tar.xz musl-8741ffe625363a553e8f509dc3ca7b071bdbab47.zip |
fix pthread_cond_wait cancellation race
it's possible that signaling a waiter races with cancellation of that same waiter. previously, cancellation was acted upon, causing the signal to be consumed with no waiter returning. by using the new masked cancellation state, it's possible to refuse to act on the cancellation request and instead leave it pending. to ease review and understanding of the changes made, this commit leaves the unwait function, which was previously the cancellation cleanup handler, in place. additional simplifications could be made by removing it.
Diffstat (limited to 'src/thread/__set_thread_area.c')
0 files changed, 0 insertions, 0 deletions