Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I refer to those use cases as mutual exclusion sempahoressemaphores, and signaling semaphores. I think both should work the same: For both the semaphore wait should be terminated and correct error should be returned.

...

There is a cancel.c test, but the more intesting interesting is the pthread_cleanup.c test. You can see how all this works when the code unwinds with the ECANCELED error and calls leave_cancellation_point. Just single step through pthread_cond_wait() to see this.

...