This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2]: Avoid cancellable I/O primitives in ld.so.
- From: Zack Weinberg <zackw at panix dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Sat, 14 Apr 2018 16:58:19 -0400
- Subject: Re: [PATCH v2]: Avoid cancellable I/O primitives in ld.so.
- References: <20180414144734.21777-1-zackw@panix.com> <87sh7xk6fb.fsf@linux-m68k.org>
On Sat, Apr 14, 2018 at 2:07 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Apr 14 2018, Zack Weinberg <zackw@panix.com> wrote:
>> diff --git a/csu/check_fds.c b/csu/check_fds.c
>> index 2b181d44ab..605ee4f3f4 100644
>> --- a/csu/check_fds.c
>> +++ b/csu/check_fds.c
>> @@ -39,8 +39,7 @@
>> static void
>> check_one_fd (int fd, int mode)
>> {
>> - /* Note that fcntl() with this parameter is not a cancellation point. */
>> - if (__builtin_expect (__libc_fcntl (fd, F_GETFD), 0) == -1
>> + if (__builtin_expect (__fcntl_nocancel (fd, F_GETFD), 0) == -1
>
> Please also change that to use __glibc_unlikely.
There are several other uses of __builtin_expect in this file, so I
will send a separate patch for that.
zw