This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch rth/hpt updated. glibc-2.19-687-gfb88f70
- From: rth at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 25 Jun 2014 21:47:48 -0000
- Subject: GNU C Library master sources branch rth/hpt updated. glibc-2.19-687-gfb88f70
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, rth/hpt has been updated
via fb88f701b32a882decb984e17f0b646c6acad6d9 (commit)
from d78c826f7ee59cb41bb94f0e27c60fa2f1ec8f6c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb88f701b32a882decb984e17f0b646c6acad6d9
commit fb88f701b32a882decb984e17f0b646c6acad6d9
Author: Richard Henderson <rth@twiddle.net>
Date: Wed Jun 25 14:47:41 2014 -0700
fixup! Unify hp-timing implementations
diff --git a/sysdeps/generic/hp-timing-common.h b/sysdeps/generic/hp-timing-common.h
index 6732694..1d7e95e 100644
--- a/sysdeps/generic/hp-timing-common.h
+++ b/sysdeps/generic/hp-timing-common.h
@@ -42,32 +42,21 @@
#include <_itoa.h>
/* Compute the difference between START and END, storing into DIFF. */
-# define HP_TIMING_DIFF(Diff, Start, End) \
- _hp_timing_diff(&(Diff), (Start), (End))
-static inline void
-_hp_timing_diff(hp_timing_t *diff, hp_timing_t s, hp_timing_t e)
-{
- *diff = e - s;
-}
+#define HP_TIMING_DIFF(Diff, Start, End) ((Diff) = (End) - (Start))
/* Accumulate ADD into SUM. No attempt is made to be thread-safe. */
-# define HP_TIMING_ACCUM_NT(Sum, Diff) \
- _hp_timing_accum_nt(&(Sum), (Diff))
-static inline void
-_hp_timing_accum_nt(hp_timing_t *sum, hp_timing_t add)
-{
- *sum += add;
-}
+#define HP_TIMING_ACCUM_NT(Sum, Diff) ((Sum) += (Diff))
/* Write a decimal representation of the timing value into the given string. */
-#define HP_TIMING_PRINT(D, L, V) \
- _hp_timing_print(D, L, V)
-static inline void _hp_timing_print(char *dest, size_t len, hp_timing_t val)
-{
- char buf[20];
- char *cp = _itoa (val, buf + sizeof (buf), 10, 0);
- size_t cp_len = MIN (buf + sizeof (buf) - cp, len);
- memcpy (dest, cp, cp_len);
- memcpy (dest + cp_len, " cycles", MIN (len - cp_len, sizeof (" cycles")));
- dest[len - 1] = '\0';
-}
+#define HP_TIMING_PRINT(Dest, Len, Val) \
+ do { \
+ char __buf[20]; \
+ char *__dest = (Dest); \
+ size_t __len = (Len); \
+ char *__cp = _itoa ((Val), __buf + sizeof (__buf), 10, 0); \
+ size_t __cp_len = MIN (__buf + sizeof (__buf) - __cp, __len); \
+ memcpy (__dest, __cp, __cp_len); \
+ memcpy (__dest + __cp_len, " cycles", \
+ MIN (__len - __cp_len, sizeof (" cycles"))); \
+ __dest[__len - 1] = '\0'; \
+ } while (0)
-----------------------------------------------------------------------
Summary of changes:
sysdeps/generic/hp-timing-common.h | 39 ++++++++++++-----------------------
1 files changed, 14 insertions(+), 25 deletions(-)
hooks/post-receive
--
GNU C Library master sources