remove unneed function. Use hpread in context switch benchmark.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 13 May 2010 12:23:13 +0000 (12:23 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 13 May 2010 12:23:13 +0000 (12:23 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3675 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/benchmark/context_switch.c
bertos/cpu/arm/drv/timer_at91.c
bertos/cpu/arm/drv/timer_at91.h
bertos/cpu/avr/drv/timer_avr.h
bertos/cpu/cortex-m3/drv/timer_cm3.h
bertos/drv/timer.h

index 92d9d9dcd8e58894a906448554251959bd9b1006..a1a1d0204b91cfc129c82e6f78fc22d17e6dd422 100644 (file)
@@ -73,7 +73,7 @@ static void NORETURN hp_process(void)
        {
                sig_wait(SIG_USER0);
                #if CONFIG_USE_HP_TIMER
-                       end = timer_clock_hp();
+                       end = timer_hw_hpread();
                #endif
                #if CONFIG_USE_LED
                        LED_ON();
@@ -91,7 +91,7 @@ static void NORETURN lp_process(void)
        {
                sig_wait(SIG_USER1);
                #if CONFIG_USE_HP_TIMER
-                       start = timer_clock_hp();
+                       start = timer_hw_hpread();
                #endif
                #if CONFIG_USE_LED
                        LED_ON();
index 2508b64baa8b30040cd0b8bc4ba606c9dad55314..beab00d60bf92fe7697033d75accdb3c9aa0947c 100644 (file)
@@ -30,8 +30,6 @@
  *
  * -->
  *
- * \version $Id$
- *
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \brief Low-level timer module for Atmel AT91 (inplementation).
index 63c2c6448ad091e9b637549befb631bffd98c8de..0628d3940330d3cbdd4f22bd735d1750d4815035 100644 (file)
@@ -30,8 +30,6 @@
  *
  * -->
  *
- * \version $Id$
- *
  * \author Francesco Sacchi <batt@develer.com>
  *
  * \brief Low-level timer module for Atmel AT91 (interface).
                return PIIR & CPIV_MASK;
        }
 
-       INLINE hptime_t timer_hw_hpticks(ticks_t clock)
-       {
-               return timer_hw_hpread() + clock * TIMER_HW_CNT;
-       }
-
 #else
 
        #error Unimplemented value for CONFIG_TIMER
index 20764a1b60658328913da827d6a081b4cf160570..78225ff19fabe52445f96cb2bb165867f080a0f8 100644 (file)
@@ -33,8 +33,6 @@
  *
  * \brief Low-level timer module for AVR (interface).
  *
- * \version $Id$
- *
  * \author Bernie Innocenti <bernie@codewiz.org>
  * \author Francesco Sacchi <batt@develer.com>
  * \author Luca Ottaviano <lottaviano@develer.com>
 /** Not needed, timer IRQ handler called only for timer source */
 #define timer_hw_triggered() (true)
 
-
-INLINE hptime_t timer_hw_hpticks(ticks_t clock)
-{
-       return timer_hw_hpread() + clock * TIMER_HW_CNT;
-}
-
 void timer_hw_init(void);
 
 #endif /* DRV_TIMER_AVR_H */
index 3e47d294912bacc447ad4b1bc628001ed79a24b5..1ee8b7a2a3bc4263f3878c70b3ccf3ba8ec9ed41 100644 (file)
 
        INLINE hptime_t timer_hw_hpread(void)
        {
-               return NVIC_ST_CURRENT_R;
-       }
-
-       INLINE hptime_t timer_hw_hpticks(ticks_t clock)
-       {
-               return (TIMER_HW_CNT - timer_hw_hpread()) + clock * TIMER_HW_CNT;
+               return (TIMER_HW_CNT - NVIC_ST_CURRENT_R);
        }
 
 #else
index 0fd030749c80045b4a7cc862188c4c8116c9e112..50d118a9f8845824f9483ab81ceef7cc0640dd54 100644 (file)
@@ -41,7 +41,6 @@
  * Whenever a timer expires you need to explicitly arm it again with timer_add(). If you want to abort a timer, use timer_abort().
  * You can use conversion macros when using msecs to specify the delay.
  *
- * \version $Id$
  * \author Bernie Innocenti <bernie@codewiz.org>
  *
  * $WIZ$ module_name = "timer"
@@ -146,12 +145,6 @@ INLINE ticks_t timer_clock_unlocked(void)
        return _clock;
 }
 
-/**
- */
-INLINE hptime_t timer_clock_hp(void)
-{
-       return timer_hw_hpticks(_clock);
-}
 
 /** Convert \a ms [ms] to ticks. */
 INLINE ticks_t ms_to_ticks(mtime_t ms)