From 33feeffe5dd4706289e9a202009a7072aa228366 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 29 Aug 2011 11:23:43 -0700 Subject: [PATCH] Update timing header so it works with C code --- examples/timing.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/timing.h b/examples/timing.h index a51ab372..f61fbce8 100644 --- a/examples/timing.h +++ b/examples/timing.h @@ -38,7 +38,9 @@ #include #define rdtsc __rdtsc #else +#ifdef __cplusplus extern "C" { +#endif /* __cplusplus */ __inline__ uint64_t rdtsc() { uint32_t low, high; __asm__ __volatile__ ( @@ -48,7 +50,9 @@ extern "C" { "rdtsc" : "=a" (low), "=d" (high)); return (uint64_t)high << 32 | low; } +#ifdef __cplusplus } +#endif /* __cplusplus */ #endif static uint64_t start, end;