rt/msr_jitter.c
changeset 43 35120a61d55e
parent 42 a22a202d0f42
--- a/rt/msr_jitter.c	Thu Jan 05 13:39:39 2006 +0000
+++ b/rt/msr_jitter.c	Thu Jan 05 14:11:25 2006 +0000
@@ -1,58 +1,20 @@
-/**************************************************************************************************
-*
-*                          msr_jitter.c
-*
-*           
-*           Autor: Wilhelm Hagemeister
-*
-*           (C) Copyright IgH 2002
-*           Ingenieurgemeinschaft IgH
-*           Heinz-Bäcker Str. 34
-*           D-45356 Essen
-*           Tel.: +49 201/61 99 31
-*           Fax.: +49 201/61 98 36
-*           E-mail: hm@igh-essen.com
-*
-*
-*           $RCSfile: msr_adeos_latency.c,v $
-*           $Revision: 1.3 $
-*           $Author: hm $
-*           $Date: 2005/12/07 20:13:53 $
-*           $State: Exp $
-*
-*
-*           $Log: msr_adeos_latency.c,v $
-*           Revision 1.3  2005/12/07 20:13:53  hm
-*           *** empty log message ***
-*
-*           Revision 1.2  2005/12/07 15:56:13  hm
-*           *** empty log message ***
-*
-*           Revision 1.1  2005/12/07 08:43:40  hm
-*           Initial revision
-*
-*           Revision 1.5  2005/11/14 20:28:09  hm
-*           *** empty log message ***
-*
-*           Revision 1.4  2005/11/13 10:34:07  hm
-*           *** empty log message ***
-*
-*           Revision 1.3  2005/11/12 20:52:46  hm
-*           *** empty log message ***
-*
-*           Revision 1.2  2005/11/12 20:51:27  hm
-*           *** empty log message ***
-*
-*           Revision 1.1  2005/11/12 19:16:02  hm
-*           Initial revision
-*
-*           Revision 1.13  2005/06/17 11:35:13  hm
-*           *** empty log message ***
-*
-*
-*
-*
-**************************************************************************************************/
+/******************************************************************************
+ *
+ * msr_jitter.c
+ *
+ * Autor: Wilhelm Hagemeister
+ *
+ * (C) Copyright IgH 2002
+ * Ingenieurgemeinschaft IgH
+ * Heinz-Bäcker Str. 34
+ * D-45356 Essen
+ * Tel.: +49 201/61 99 31
+ * Fax.: +49 201/61 98 36
+ * E-mail: hm@igh-essen.com
+ *
+ * $Id$
+ *
+ *****************************************************************************/
 
 #ifndef __KERNEL__
 #  define __KERNEL__
@@ -71,27 +33,24 @@
 #include <msr_reg.h>
 #include "msr_jitter.h"
 
-/*--includes-------------------------------------------------------------------------------------*/
- 
+/*--includes-----------------------------------------------------------------*/
 
-/*--external functions---------------------------------------------------------------------------*/
+/*--external functions-------------------------------------------------------*/
 
-/*--external data--------------------------------------------------------------------------------*/
+/*--external data------------------------------------------------------------*/
 
-/*--public data----------------------------------------------------------------------------------*/
+/*--public data--------------------------------------------------------------*/
 
-/*--local data-----------------------------------------------------------------------------------*/
+/*--local data---------------------------------------------------------------*/
 
 #define NUMCLASSES 16
 
-static int jittime[NUMCLASSES]={0,1,2,5,10,20,50,100,200,500,1000,2000,5000,10000,20000,50000}; //in usec
+static int jittime[NUMCLASSES]={0,1,2,5,10,20,50,100,200,500,
+                                1000,2000,5000,10000,20000,50000}; //in usec
 static int jitcount[NUMCLASSES];
 static double jitpercent[NUMCLASSES];
-
 static unsigned int tcount = 1;
 
-
-
 static void msr_jit_read(void)
 {
     int i;
@@ -104,27 +63,28 @@
 
 void msr_jitter_init(void)
 {
-    msr_reg_int_list("/Taskinfo/Jitter/Classes","usec",&jittime[0],MSR_R,NUMCLASSES,NULL,NULL,NULL);
-    msr_reg_int_list("/Taskinfo/Jitter/Count","",&jitcount[0],MSR_R,NUMCLASSES,NULL,NULL,NULL);
-    msr_reg_dbl_list("/Taskinfo/Jitter/percent","%",&jitpercent[0],MSR_R,NUMCLASSES,NULL,NULL,&msr_jit_read);
+    msr_reg_int_list("/Taskinfo/Jitter/Classes","usec",
+                     &jittime[0],MSR_R,NUMCLASSES,NULL,NULL,NULL);
+    msr_reg_int_list("/Taskinfo/Jitter/Count","",
+                     &jitcount[0],MSR_R,NUMCLASSES,NULL,NULL,NULL);
+    msr_reg_dbl_list("/Taskinfo/Jitter/percent","%",
+                     &jitpercent[0],MSR_R,NUMCLASSES,NULL,NULL,&msr_jit_read);
 }
 
-/*
-***************************************************************************************************
-*
-* Function: msr_jitter_run
-*
-* Beschreibung: 
-*               
-*
-* Parameter: Zeiger auf msr_data
-*
-* Rückgabe: 
-*               
-* Status: exp
-*
-***************************************************************************************************
-*/
+/******************************************************************************
+ *
+ * Function: msr_jitter_run
+ *
+ * Beschreibung:
+ *
+ *
+ * Parameter: Zeiger auf msr_data
+ *
+ * Rückgabe:
+ *
+ * Status: exp
+ *
+ *****************************************************************************/
 
 void msr_jitter_run(unsigned int hz) {
 
@@ -140,9 +100,11 @@
 
     //Zeitabstand zwischen zwei Interrupts in usec
 
-    dt = ((unsigned long)(100000/HZ)*((unsigned long)(k-j)))/(current_cpu_data.loops_per_jiffy/10);
+    dt = ((unsigned long)(100000/HZ)*((unsigned long)(k-j)))
+        /(current_cpu_data.loops_per_jiffy/10);
 
-    jitter = (unsigned int)abs((int)dt-(int)1000000/hz); //jitter errechnet zum Sollabtastrate
+    jitter = (unsigned int)abs((int)dt-(int)1000000/hz);
+    //jitter errechnet zum Sollabtastrate
 
     //in die Klassen einsortieren
     if(!firstrun) { //das erste mal nicht einsortieren
@@ -165,20 +127,3 @@
 
 
 }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-