summaryrefslogtreecommitdiff
path: root/sysdeps/posix/clock_getres.c
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 /sysdeps/posix/clock_getres.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/posix/clock_getres.c')
-rw-r--r--sysdeps/posix/clock_getres.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
index 27f264bb16..0bb1399e97 100644
--- a/sysdeps/posix/clock_getres.c
+++ b/sysdeps/posix/clock_getres.c
@@ -30,7 +30,7 @@ static long int nsec; /* Clock frequency of the processor. */
static int
hp_timing_getres (struct timespec *res)
{
- if (__builtin_expect (nsec == 0, 0))
+ if (__glibc_unlikely (nsec == 0))
{
hp_timing_t freq;
@@ -39,7 +39,7 @@ hp_timing_getres (struct timespec *res)
code against multiple execution since all of them should
lead to the same result. */
freq = __get_clockfreq ();
- if (__builtin_expect (freq == 0, 0))
+ if (__glibc_unlikely (freq == 0))
/* Something went wrong. */
return -1;
@@ -60,7 +60,7 @@ realtime_getres (struct timespec *res)
{
long int clk_tck = sysconf (_SC_CLK_TCK);
- if (__builtin_expect (clk_tck != -1, 1))
+ if (__glibc_likely (clk_tck != -1))
{
/* This implementation assumes that the realtime clock has a
resolution higher than 1 second. This is the case for any