thr_cancel.c: style thr_sig.c: style libthr: move dlerror_msg into zeroed part of struct thread struct thread reuse might cause stalled rtld error message to propagate to the new thread. thr_cancel.c: use testcancel() instead of manually expanding it pthread_setcancelstate(3): make it async-signal-safe by setting new cancel state and reading old cancel state from the curthread structure atomic. Note that this does not play well with async cancellation, since if cancellation is enabled from a signal handler and cancellation request is pending, the thread is cancelled immediately, calling user-defined destructors, which all must be async-signal-safe (but this is a general requirement for async cancellation anyway). check_cancel: when in_sigsuspend, send SIGCANCEL unconditionally not only when check_cancel is called from the signal handler. _thr_wake() is not enough to get the sigsuspend(2) syscall out of the loop, since it only terminates sleep when an unblocked signal is delivered. PR: 283101 Tested by: pho
Details
Details
- Reviewers
markj
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped