]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/ia32/timer-apic.cpp
update
[l4.git] / kernel / fiasco / src / kern / ia32 / timer-apic.cpp
index 7e971c6b6a932165f0c0533c5fe6d32bb859e85b..c9c60646d9ad4e58674fa4536e9fa6e80b092161 100644 (file)
@@ -64,7 +64,7 @@ static
 void
 Timer::update_one_shot(Unsigned64 wakeup)
 {
-  unsigned cpu = current_cpu();
+  //unsigned cpu = current_cpu();
   Unsigned32 apic;
   Unsigned64 now = Kip::k()->clock; //Cpu::cpus.cpu(cpu).time_us();
   if (EXPECT_FALSE (wakeup <= now))
@@ -73,10 +73,10 @@ Timer::update_one_shot(Unsigned64 wakeup)
   else
     {
       Unsigned64 delta = wakeup - now;
-      if (delta < 1000)
-       apic = Apic::us_to_apic(1000);
-      else if (delta > 10000)
-       apic = Apic::us_to_apic(10000);
+      if (delta < Config::One_shot_min_interval_us)
+       apic = Apic::us_to_apic(Config::One_shot_min_interval_us);
+      else if (delta > Config::One_shot_max_interval_us)
+       apic = Apic::us_to_apic(Config::One_shot_max_interval_us);
       else
         apic = Apic::us_to_apic(delta);