Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Added CR0 handling for PROTECTED_PG and for the CLTS instruction
[palacios.git] / palacios / src / geekos / timer.c
index e0311a4..7355efb 100644 (file)
@@ -2,7 +2,7 @@
  * GeekOS timer interrupt support
  * Copyright (c) 2001,2003 David H. Hovemeyer <daveho@cs.umd.edu>
  * Copyright (c) 2003, Jeffrey K. Hollingsworth <hollings@cs.umd.edu>
- * $Revision: 1.4 $
+ * $Revision: 1.8 $
  * 
  * This is free software.  You are permitted to use,
  * redistribute, and modify it as specified in the file "COPYING".
@@ -202,24 +202,33 @@ int g_Quantum = DEFAULT_MAX_TICKS;
 
 static void Timer_Interrupt_Handler(struct Interrupt_State* state)
 {
-    struct Kernel_Thread* current = g_currentThread;
+   struct Kernel_Thread* current = g_currentThread;
 
     Begin_IRQ(state);
 
-    SerialPrintLevel(1,"Host Timer Interrupt Handler Running\n");
 
+
+#if 0
+#define STACK_LEN 256
+
+    SerialPrint("Host Timer Interrupt Handler running\n");
+    SerialPrint("Timer====\n");
+    Dump_Interrupt_State(state);
+    //    SerialMemDump((unsigned char*)(&current),STACK_LEN);
+    SerialPrint("Timer done===\n");
+
+#endif
     /* Update global and per-thread number of ticks */
     ++g_numTicks;
     ++current->numTicks;
 
-
     /*
      * If thread has been running for an entire quantum,
      * inform the interrupt return code that we want
      * to choose a new thread.
      */
     if (current->numTicks >= g_Quantum) {
-       g_needReschedule = true;
+       g_needReschedule = true;
     }