Olivier Guilyardi wrote:
excuse my chiming in here, i'm not really much of a c programmer... but
how can this
- rb->read_ptr += n1;
- rb->read_ptr &= rb->size_mask;
+ rb->read_ptr = (rb->read_ptr + n1) & rb->size_mask;
iiuc, both versions are equivalent. a context switch could happen just
as well after the parenthesis has been computed..!?
putting stuff on one line doesn't make it atomic. maybe you are now
getting another compiler optimization that helps to hide the bug?
no offense, just trying to learn something...
home://germany/45128 essen/lortzingstr. 11/
Kurt is up in Heaven now.
Linux-audio-user mailing list