[patch 33/38] CKRM e18: Send timestamps to userspace in msecs instead of jiffies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Send timestamps to userspace in msecs instead of jiffies.

Signed-Off-By: Matt Helsley <[email protected]>
Signed-Off-By: Gerrit Huizenga <[email protected]>

---------------------------------------------------------------------

Index: linux-2.6.12-ckrm1/include/linux/crbce.h
===================================================================
--- linux-2.6.12-ckrm1.orig/include/linux/crbce.h	2005-06-20 15:37:54.000000000 -0700
+++ linux-2.6.12-ckrm1/include/linux/crbce.h	2005-06-20 15:37:59.000000000 -0700
@@ -90,7 +90,7 @@ struct crbce_hdr {
 struct crbce_hdr_ts {
 	int type;
 	pid_t pid;
-	uint32_t jiffies;
+	uint32_t timestamp;  /* in msecs */
 	uint64_t cls;
 };
 
Index: linux-2.6.12-ckrm1/kernel/ckrm/rbce/crbce_ext.c
===================================================================
--- linux-2.6.12-ckrm1.orig/kernel/ckrm/rbce/crbce_ext.c	2005-06-20 13:08:48.000000000 -0700
+++ linux-2.6.12-ckrm1/kernel/ckrm/rbce/crbce_ext.c	2005-06-20 15:37:59.000000000 -0700
@@ -25,6 +25,7 @@
 
 #include <net/sock.h>
 #include <linux/netlink.h>
+#include <linux/jiffies.h>
 #include "rbce_internal.h"
 
 #define PSAMPLE(pdata)    (&((pdata)->ext_data.sample))
@@ -123,7 +124,8 @@ static inline void close_ukcc_channel(vo
 
 #define rec_set_hdr(r,t,p)      ((r)->hdr.type = (t), (r)->hdr.pid = (p))
 #define rec_set_timehdr(r,t,p,c)  (rec_set_hdr(r,t,p), \
-	(r)->hdr.jiffies = jiffies, (r)->hdr.cls=(unsigned long)(c) )
+	(r)->hdr.timestamp = jiffies_to_msecs(jiffies), \
+	(r)->hdr.cls=(unsigned long)(c) )
 
 #if CHANNEL_AUTO_CONT
 

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux