This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Finish __builtin_expect -> __glibc_{un}likely cleanup in elf/dl-load.c


On Thu, Mar 27, 2014 at 4:42 AM, OndÅej BÃlka <neleai@seznam.cz> wrote:

> On Wed, Mar 26, 2014 at 05:30:03PM -0700, Paul Pluzhnikov wrote:

>> @@ -2104,8 +2103,7 @@ _dl_map_object (struct link_map *loader, const char *name,
>>        /* If the requested name matches the soname of a loaded object,
>>        use that object.  Elide this check for names that have not
>>        yet been opened.  */
>> -      if (__glibc_unlikely (l->l_faked != 0)
>> -       || __builtin_expect (l->l_removed, 0) != 0)
>> +      if (__glibc_unlikely (l->l_faked != 0 || l->l_removed != 0))
>>       continue;
>>        if (!_dl_name_match_p (name, l))
>>       {
...
> if (__glibc_unlikely (l->l_faked | l->l_removed != 0))
>   continue;

Done.

>> @@ -2230,7 +2228,7 @@ _dl_map_object (struct link_map *loader, const char *name,
>>
>>  #ifdef USE_LDCONFIG
>>        if (fd == -1
>> -       && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
>> +       && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
>>             || ! INTUSE(__libc_enable_secure))
>>         && __glibc_likely (GLRO(dl_inhibit_cache) == 0))
>>       {
>
> Extra parens here.

Are there? I don't see them :-(

Thanks,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]