Versions Compared

Key

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

...

This noncompliant code example violates the liveness property.

Compliant Solution (cnd_broadcast())

...

Awakening all threads solves guarantees the liveness property because each thread will execute its condition predicate test, and exactly one will succeed and continue execution.

...

Bibliography

[IEEE Std 1003.1:2013]XSH, System Interfaces, pthread_cond_broadcast
XSH, System Interfaces, pthread_cond_signal
[Lea 2000] 

...