[PATCH] Fix nptl/tst-setuid3.c

Paul E. Murphy murphyp@linux.vnet.ibm.com
Tue Jan 19 20:32:00 GMT 2016


Thank you both for the review! Here is a minor update to use an
inline function instead as suggested by Florian.

On 01/19/2016 02:20 PM, Adhemerval Zanella wrote:
> 
> 
> 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.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-nptl-tst-setuid3.c.patch
Type: text/x-patch
Size: 2491 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160119/84b15ff6/attachment.bin>


More information about the Libc-alpha mailing list