patch-1.3.7 linux/include/linux/stats206.h
Next file: linux/include/linux/timer.h
Previous file: linux/include/linux/smbno.h
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Sat Jul 1 19:06:00 1995
- Orig file:
v1.3.6/linux/include/linux/stats206.h
- Orig date:
Thu Jan 1 02:00:00 1970
diff -u --recursive --new-file v1.3.6/linux/include/linux/stats206.h linux/include/linux/stats206.h
@@ -0,0 +1,34 @@
+/* stats206.h. Define constants to gather statistics on the cm206 behavior.
+ Copyright (c) 1995 David van Leeuwen.
+
+ This is published under the Gnu Public Licence, read the header in
+ the file cm206.c.
+*/
+
+/* This is an ugly way to guarantee that the names of the statistics
+ * are the same in the code and in the diagnostics program. */
+
+#ifdef __KERNEL__
+#define x(a) st_ ## a
+#define y enum
+#else
+#define x(a) #a
+#define y char * stats_name[] =
+#endif
+
+y {x(interrupt), x(data_ready), x(fifo_overflow), x(data_error),
+ x(crc_error), x(sync_error), x(lost_intr), x(echo),
+ x(write_timeout), x(receive_timeout), x(read_timeout),
+ x(dsb_timeout), x(stop_0xff), x(back_read_timeout),
+ x(sector_transferred), x(read_restarted), x(read_background),
+ x(bh), x(open), x(ioctl_multisession)
+#ifdef __KERNEL__
+ , x(last_entry)
+#endif
+ };
+
+#ifdef __KERNEL__
+#define NR_STATS st_last_entry
+#else
+#define NR_STATS sizeof(stats_name)/sizeof(char*)
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this