summaryrefslogtreecommitdiff
path: root/dlfcn
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /dlfcn
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/dladdr.c2
-rw-r--r--dlfcn/dladdr1.c2
-rw-r--r--dlfcn/dlclose.c2
-rw-r--r--dlfcn/dlerror.c2
-rw-r--r--dlfcn/dlinfo.c2
-rw-r--r--dlfcn/dlmopen.c4
-rw-r--r--dlfcn/dlopen.c2
-rw-r--r--dlfcn/dlopenold.c2
-rw-r--r--dlfcn/dlsym.c2
-rw-r--r--dlfcn/dlvsym.c2
10 files changed, 11 insertions, 11 deletions
diff --git a/dlfcn/dladdr.c b/dlfcn/dladdr.c
index 2b93cec210..922ca44dae 100644
--- a/dlfcn/dladdr.c
+++ b/dlfcn/dladdr.c
@@ -32,7 +32,7 @@ int
__dladdr (const void *address, Dl_info *info)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dladdr (address, info);
# endif
return _dl_addr (address, info, NULL, NULL);
diff --git a/dlfcn/dladdr1.c b/dlfcn/dladdr1.c
index a8f10beed3..0efc0dcd3d 100644
--- a/dlfcn/dladdr1.c
+++ b/dlfcn/dladdr1.c
@@ -32,7 +32,7 @@ int
__dladdr1 (const void *address, Dl_info *info, void **extra, int flags)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dladdr1 (address, info, extra, flags);
# endif
diff --git a/dlfcn/dlclose.c b/dlfcn/dlclose.c
index 8b5decc46c..ca55b5f293 100644
--- a/dlfcn/dlclose.c
+++ b/dlfcn/dlclose.c
@@ -39,7 +39,7 @@ int
__dlclose (void *handle)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlclose (handle);
# endif
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index d9bbecf495..6dd47a7eaf 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -63,7 +63,7 @@ __dlerror (void)
struct dl_action_result *result;
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlerror ();
# endif
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c
index f2527fee72..1876d9dfe7 100644
--- a/dlfcn/dlinfo.c
+++ b/dlfcn/dlinfo.c
@@ -111,7 +111,7 @@ int
__dlinfo (void *handle, int request, void *arg DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlinfo (handle, request, arg,
DL_CALLER);
# endif
diff --git a/dlfcn/dlmopen.c b/dlfcn/dlmopen.c
index 1e2cbcfdb4..115f6e9e28 100644
--- a/dlfcn/dlmopen.c
+++ b/dlfcn/dlmopen.c
@@ -64,7 +64,7 @@ dlmopen_doit (void *a)
/* It makes no sense to use RTLD_GLOBAL when loading a DSO into
a namespace other than the base namespace. */
- if (__builtin_expect (args->mode & RTLD_GLOBAL, 0))
+ if (__glibc_unlikely (args->mode & RTLD_GLOBAL))
GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid mode"));
}
@@ -79,7 +79,7 @@ void *
__dlmopen (Lmid_t nsid, const char *file, int mode DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlmopen (nsid, file, mode, RETURN_ADDRESS (0));
# endif
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index 2db6610a77..fa58c4cebf 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -74,7 +74,7 @@ void *
__dlopen (const char *file, int mode DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlopen (file, mode, DL_CALLER);
# endif
diff --git a/dlfcn/dlopenold.c b/dlfcn/dlopenold.c
index 6d3a430cf6..67fac16d1d 100644
--- a/dlfcn/dlopenold.c
+++ b/dlfcn/dlopenold.c
@@ -70,7 +70,7 @@ __dlopen_nocheck (const char *file, int mode)
mode |= RTLD_LAZY;
args.mode = mode;
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlopen (file, mode, RETURN_ADDRESS (0));
return _dlerror_run (dlopen_doit, &args) ? NULL : args.new;
diff --git a/dlfcn/dlsym.c b/dlfcn/dlsym.c
index a1e2e01775..7bcc78d50e 100644
--- a/dlfcn/dlsym.c
+++ b/dlfcn/dlsym.c
@@ -55,7 +55,7 @@ void *
__dlsym (void *handle, const char *name DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlsym (handle, name, DL_CALLER);
# endif
diff --git a/dlfcn/dlvsym.c b/dlfcn/dlvsym.c
index 5d05d97963..d7a766b283 100644
--- a/dlfcn/dlvsym.c
+++ b/dlfcn/dlvsym.c
@@ -58,7 +58,7 @@ __dlvsym (void *handle, const char *name, const char *version_str
DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (__glibc_unlikely (_dlfcn_hook != NULL))
return _dlfcn_hook->dlvsym (handle, name, version_str, DL_CALLER);
# endif