[PATCH 1/3] nptl: Extract <bits/atomic_wide_counter.h> from pthread_cond_common.c
Jakub Jelinek
jakub@redhat.com
Thu Nov 18 13:19:02 GMT 2021
On Wed, Nov 03, 2021 at 05:27:42PM +0100, Florian Weimer wrote:
> + /* S3. See __condvar_load_64_relaxed. */
Shouldn't that be See __atomic_wide_counter_load_relaxed ?
> + if (((l >> 31) > 0) && ((h >> 31) > 0))
Any reason not to write it as (int) l < 0 && (int) h < 0?
Yes, the compiler will likely optimize it that way (probably
even as (int) (l & h) < 0, but still...
Jakub
More information about the Gcc-patches
mailing list