Commit ecd6d2bb authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix timer inlining.


Former-commit-id: 782b63fbcab3d9c09598fc9192bc767f081bb399
parent 75701329
......@@ -171,7 +171,14 @@ INLINE_ELAPSED(__inline__)
#if (defined(__GNUC__) || defined(__ICC)) && defined(__i386__) && !defined(HAVE_TICK_COUNTER)
typedef unsigned long long ticks;
static __inline__ ticks getticks(void)
#ifndef INLINE
# if __GNUC__ && !__GNUC_STDC_INLINE__
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
INLINE ticks getticks(void)
{
ticks ret;
......@@ -220,7 +227,14 @@ static __inline double elapsed(ticks t1, ticks t0)
#if (defined(__GNUC__) || defined(__ICC) || defined(__SUNPRO_C)) && defined(__x86_64__) && !defined(HAVE_TICK_COUNTER)
typedef unsigned long long ticks;
static __inline__ ticks getticks(void)
#ifndef INLINE
# if __GNUC__ && !__GNUC_STDC_INLINE__
# define INLINE extern inline
# else
# define INLINE inline
# endif
#endif
INLINE ticks getticks(void)
{
unsigned a, d;
asm volatile("rdtsc" : "=a" (a), "=d" (d));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment