patch-2.2.4 linux/include/asm-sparc64/timex.h
Next file: linux/include/asm-sparc64/unistd.h
Previous file: linux/include/asm-sparc64/termios.h
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
Wed Mar 10 16:53:38 1999
- Orig file:
v2.2.3/linux/include/asm-sparc64/timex.h
- Orig date:
Fri May 8 23:14:56 1998
diff -u --recursive --new-file v2.2.3/linux/include/asm-sparc64/timex.h linux/include/asm-sparc64/timex.h
@@ -12,4 +12,13 @@
(1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \
<< (SHIFT_SCALE-SHIFT_HZ)) / HZ)
+/* Getting on the cycle counter on sparc64. */
+typedef unsigned long cycles_t;
+extern cycles_t cacheflush_time;
+#define get_cycles() \
+({ cycles_t ret; \
+ __asm__("rd %%tick, %0" : "=r" (ret)); \
+ ret; \
+})
+
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)