Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'stop' flag changed out of lock protection
This is the first nice effect of previous patch ! Because thread_should_stop() should be declared 'const' we need to remove the setting of 'stop' flag to true that turns out to be a bug because thread_should_stop() is called outside from lock protection while 'stop' flag is a volatile shared variable so cannot be changed when not in lock. Note that this bugs fires ONLY when we use more then 2 threads, so commonly only in a QUAD or OCTAL machine. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
- Loading branch information
Showing
1 changed file
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters