• R
    fix pthread_cond_wait cancellation race · 8741ffe6
    Rich Felker 提交于
    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.
    8741ffe6
pthread_cond_timedwait.c 6.0 KB