From: bernie Date: Fri, 24 Feb 2006 00:26:49 +0000 (+0000) Subject: Fixes for CONFIG_KERNEL. X-Git-Tag: 1.0.0~691 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2a5698ac0ea139d09429b66e4aa785b82adb424b;p=bertos.git Fixes for CONFIG_KERNEL. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@550 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/drv/timer.c b/drv/timer.c index 8036816c..85175224 100755 --- a/drv/timer.c +++ b/drv/timer.c @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.30 2006/02/24 00:26:49 bernie + *#* Fixes for CONFIG_KERNEL. + *#* *#* Revision 1.29 2006/02/17 22:24:07 bernie *#* Add MOD_CHECK() checks. *#* @@ -76,8 +79,13 @@ #include #endif -#if CONFIG_KERNEL && CONFIG_KERN_SIGNALS - #include +#if CONFIG_KERNEL + #include + #if CONFIG_KERN_SIGNALS + #include /* sig_wait(), sig_check() */ + #include /* proc_current() */ + #include /* BV() */ + #endif #endif @@ -151,7 +159,7 @@ void timer_add(Timer *timer) } /* Enqueue timer request into the list */ - INSERTBEFORE(&timer->link, &node->link); + INSERT_BEFORE(&timer->link, &node->link); IRQ_RESTORE(flags); } @@ -171,8 +179,8 @@ Timer *timer_abort(Timer *timer) #endif /* CONFIG_TIMER_DISABLE_EVENTS */ -/*! - * Wait for the specified amount of time (expressed in ms). +/** + * Wait for the specified amount of timer ticks. */ void timer_delayTicks(ticks_t delay) { @@ -186,7 +194,7 @@ void timer_delayTicks(ticks_t delay) ASSERT(!sig_check(SIG_SINGLE)); timer_set_event_signal(&t, proc_current(), SIG_SINGLE); - timer_set_delay(&t, delay); + timer_setDelay(&t, delay); timer_add(&t); sig_wait(SIG_SINGLE); diff --git a/drv/timer.h b/drv/timer.h index c77936ad..867fcadf 100755 --- a/drv/timer.h +++ b/drv/timer.h @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.30 2006/02/24 00:26:49 bernie + *#* Fixes for CONFIG_KERNEL. + *#* *#* Revision 1.29 2006/02/21 21:28:02 bernie *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms. *#* @@ -164,10 +167,6 @@ INLINE ticks_t timer_clock_unlocked(void) return _clock; } - - -//TODO: take care of slow timers so add convertions for seconds to ticks and viceversa. - /*! Convert \a ms [ms] to ticks. */ INLINE ticks_t ms_to_ticks(mtime_t ms) {