Port to Qt 4.1.
[bertos.git] / drv / timer_posix.c
index 9814dc245d3677e90cd419b2f86c7e49b0c93040..6d6e36735c167cd3fcd8a78a1b1e26c930873847 100755 (executable)
 
 /*#*
  *#* $Log$
+ *#* Revision 1.4  2006/02/17 22:24:21  bernie
+ *#* Update POSIX timer emulator.
+ *#*
+ *#* Revision 1.3  2006/02/10 12:34:52  bernie
+ *#* Remove spurious EXTERN_C.
+ *#*
+ *#* Revision 1.2  2006/01/16 03:30:21  bernie
+ *#* Make header C++ friendly.
+ *#*
  *#* Revision 1.1  2005/11/27 03:58:18  bernie
  *#* Add POSIX timer emulator.
  *#*
@@ -34,7 +43,7 @@
 void timer_isr(int);
 
 /// HW dependent timer initialization.
-extern "C" static void timer_hw_init(void)
+static void timer_hw_init(void)
 {
        struct sigaction sa;
        memset(&sa, 0, sizeof(sa));
@@ -49,13 +58,13 @@ extern "C" static void timer_hw_init(void)
        // Setup POSIX realtime timer to interrupt every 10ms.
        static struct itimerval itv =
        {
-               { 0, 1000 }, /* it_interval */
-               { 0, 1000 }  /* it_value */
+               { 0, 1000 / TIMER_TICKS_PER_MSEC }, /* it_interval */
+               { 0, 1000 / TIMER_TICKS_PER_MSEC }  /* it_value */
        };
        setitimer(ITIMER_REAL, &itv, NULL);
 }
 
-extern "C" INLINE hptime_t timer_hw_hpread(void)
+INLINE hptime_t timer_hw_hpread(void)
 {
        return hptime_get();
 }