[PATCH] Fix nptl/tst-setuid3.c
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Jan 19 20:20:00 GMT 2016
On 19-01-2016 18:17, Florian Weimer wrote:
> On 01/19/2016 09:09 PM, Paul E. Murphy wrote:
>> pthread_barrier_wait can return either PTHREAD_BARRIER_SERIAL_THREAD
>> or 0. Posix makes no guarantees about which thread return the unique
>> value.
>>
>> Additionally, pthread_join was not called despite seemingly checking
>> for the error.
>>
>> 2016-01-19 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
>>
>> * nptl/tst-setuid3.c (INVALID_BARRIER_WAIT): New macro.
>> (do_test): Use macro to simplify checking barrier exit
>> code, and actually join the child thread.
>
> Thanks for fixing this.
>
>> +/* True if pthread_barrier_wait returns without an error. */
>> +#define INVALID_BARRIER_WAIT(x) ((x != 0) && \
>> + (x != PTHREAD_BARRIER_SERIAL_THREAD))
>
> Please use an inline function or put parentheses around the x.
>
> Technically, this change is okay, but Adhemerval needs to decide if it
> can go in during the freeze.
>
> Florian
>
LGTM, thanks.
More information about the Libc-alpha
mailing list