make non-waiting paths of sem_[timed]wait and pthread_join cancelable

per POSIX these functions are both cancellation points, so they must
act on any cancellation request which is pending prior to the call.
previously, only the code path where actual waiting took place could
act on cancellation.
2 files changed