Please sign in to comment.
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 <email@example.com>
- Loading branch information...