The problem might be that your system's implementation of cond_wait isn't atomic
Which would be a bug worth reporting. An easy way to verify this would be to run the code above without the yields on single cpu Linux system and see if the problem occurs there?
In reply to Re^10: baton passing threads and cond_signal
by Anonymous Monk
in thread baton passing threads and cond_signal
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |