diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /nptl/sysdeps/unix/sysv/linux/getpid.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/getpid.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/getpid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/getpid.c b/nptl/sysdeps/unix/sysv/linux/getpid.c index f806f2ff87..937b1d4e11 100644 --- a/nptl/sysdeps/unix/sysv/linux/getpid.c +++ b/nptl/sysdeps/unix/sysv/linux/getpid.c @@ -27,10 +27,10 @@ static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval); static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval) { - if (__builtin_expect (oldval == 0, 1)) + if (__glibc_likely (oldval == 0)) { pid_t selftid = THREAD_GETMEM (THREAD_SELF, tid); - if (__builtin_expect (selftid != 0, 1)) + if (__glibc_likely (selftid != 0)) return selftid; } @@ -53,7 +53,7 @@ __getpid (void) pid_t result = INTERNAL_SYSCALL (getpid, err, 0); #else pid_t result = THREAD_GETMEM (THREAD_SELF, pid); - if (__builtin_expect (result <= 0, 0)) + if (__glibc_unlikely (result <= 0)) result = really_getpid (result); #endif return result; |