mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 10:50:08 +00:00
Update.
2000-10-23 Ulrich Drepper <drepper@redhat.com> * elf/dl-close.c (_dl_close): Add a few more __builtin_expect.
This commit is contained in:
parent
298ea0ffa5
commit
c41c89d35d
@ -1,3 +1,7 @@
|
|||||||
|
2000-10-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-close.c (_dl_close): Add a few more __builtin_expect.
|
||||||
|
|
||||||
2000-10-23 Jim Meyering <meyering@ascend.com>
|
2000-10-23 Jim Meyering <meyering@ascend.com>
|
||||||
|
|
||||||
Allow this code to be used outside of glibc.
|
Allow this code to be used outside of glibc.
|
||||||
|
@ -55,7 +55,7 @@ _dl_close (void *_map)
|
|||||||
/* Nope. Do nothing. */
|
/* Nope. Do nothing. */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (map->l_opencount == 0)
|
if (__builtin_expect (map->l_opencount, 1) == 0)
|
||||||
_dl_signal_error (0, map->l_name, N_("shared object not open"));
|
_dl_signal_error (0, map->l_name, N_("shared object not open"));
|
||||||
|
|
||||||
/* Acquire the lock. */
|
/* Acquire the lock. */
|
||||||
@ -150,7 +150,7 @@ _dl_close (void *_map)
|
|||||||
|
|
||||||
/* That was the last reference, and this was a dlopen-loaded
|
/* That was the last reference, and this was a dlopen-loaded
|
||||||
object. We can unmap it. */
|
object. We can unmap it. */
|
||||||
if (imap->l_global)
|
if (__builtin_expect (imap->l_global, 0))
|
||||||
{
|
{
|
||||||
/* This object is in the global scope list. Remove it. */
|
/* This object is in the global scope list. Remove it. */
|
||||||
int cnt = _dl_main_searchlist->r_nlist;
|
int cnt = _dl_main_searchlist->r_nlist;
|
||||||
@ -228,7 +228,7 @@ _dl_close (void *_map)
|
|||||||
|
|
||||||
/* Now we can perhaps also remove the modules for which we had
|
/* Now we can perhaps also remove the modules for which we had
|
||||||
dependencies because of symbol lookup. */
|
dependencies because of symbol lookup. */
|
||||||
if (rellist != NULL)
|
if (__builtin_expect (rellist != NULL, 0))
|
||||||
{
|
{
|
||||||
while (nrellist-- > 0)
|
while (nrellist-- > 0)
|
||||||
_dl_close (rellist[nrellist]);
|
_dl_close (rellist[nrellist]);
|
||||||
@ -238,7 +238,7 @@ _dl_close (void *_map)
|
|||||||
|
|
||||||
free (list);
|
free (list);
|
||||||
|
|
||||||
if (_dl_global_scope_alloc != 0
|
if (__builtin_expect (_dl_global_scope_alloc, 0) != 0
|
||||||
&& _dl_main_searchlist->r_nlist == _dl_initial_searchlist.r_nlist)
|
&& _dl_main_searchlist->r_nlist == _dl_initial_searchlist.r_nlist)
|
||||||
{
|
{
|
||||||
/* All object dynamically loaded by the program are unloaded. Free
|
/* All object dynamically loaded by the program are unloaded. Free
|
||||||
|
Loading…
Reference in New Issue
Block a user