On Wed, May 02, 2018 at 05:36:24PM +0200, Christopher Faulet wrote: > Hi Willy, > > Here is a patch to fix the sync point from more than 32 threads. It is an > obvious bug once found. But I had a hard time debugging it :)
Ah interesting one, indeed! You're lucky to have that many cores in your laptop to spot such bugs, I'll ask for one as well :-) > the function thread_no_sync() has also been updated to avoid any ambiguities. This part is not useful in my opinion as it already had the comparison. 0 has no type, it's the representation of the value with all bits set to zero for the common type. There, "threads_want_sync == 0" is an integer representing the result of the comparison of threads_want_sync and a value of the same type with all bits cleared, so it's not ambigous. It's the same for pointers, where 0 is always the size of the pointer it's compared against. That said it doesn't hurt and at least it reminds the reader to be careful. I'm merging it now. Thanks, Willy

