llvm-capstone/lldb/include
Andrew Kaylor 9ed6ae5ee0 This patch updates comments in the Predicate class to describe a subtle behavior that callers may need to be aware. It also adds documentation for one function which didn’t have any.
The subtle behavior is that the Predicate wait functions may not detect transitory changes in the predicate value.  Consider the following scenario.

Thread A waits for a bit to be set in the predicate value.
Thread B sets the bit in the predicate value.
Before Thread A wakes up, Thread C clears the bit in the predicate value.
Thread A wakes, checks the value and goes back to waiting.

The mutex and condition variables protect access to the value, but they offer no guarantee that another thread will not acquire the mutex and change the value before a waiting thread is restarted after a change.

I believe that the current behavior is correct and reasonable.  I just want to leave a marker to prevent possible problems in the future or to help anyone who might be unfortunate enough to encounter such a problem.

llvm-svn: 166800
2012-10-26 19:28:36 +00:00
..
lldb This patch updates comments in the Predicate class to describe a subtle behavior that callers may need to be aware. It also adds documentation for one function which didn’t have any. 2012-10-26 19:28:36 +00:00
Makefile Merged Eli Friedman's linux build changes where he added Makefile files that 2010-07-09 20:39:50 +00:00