X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer.c;h=92152bc1059f6a1063a45d70c219ba72f300eacb;hb=0168eb0bee0da568cd3ea8f8dfffa9343175efd9;hp=22512251278fb347f08890999bb40f1f0e136246;hpb=277b540c0764dd376dcf583acdc97a2b2fd3d8e6;p=bertos.git diff --git a/drv/timer.c b/drv/timer.c index 22512251..92152bc1 100755 --- a/drv/timer.c +++ b/drv/timer.c @@ -1,20 +1,28 @@ /*! * \file * * - * \version $Id$ + * \brief Hardware independent timer driver (implementation) * + * \version $Id$ * \author Bernardo Innocenti - * - * \brief Hardware independent timer driver (implementation) */ /*#* *#* $Log$ + *#* Revision 1.17 2004/10/03 18:52:08 bernie + *#* Move \brief on top in header to please Doxygen. + *#* + *#* Revision 1.16 2004/10/03 18:48:01 bernie + *#* timer_delay(): Add a sanity check to avoid sleeping forever. + *#* + *#* Revision 1.15 2004/09/14 21:07:18 bernie + *#* Use debug.h instead of kdebug.h. + *#* *#* Revision 1.14 2004/08/25 14:12:08 rasky *#* Aggiornato il comment block dei log RCS *#* @@ -56,10 +64,10 @@ *#* *#*/ -#include "hw.h" -#include "kdebug.h" #include "timer.h" +#include #include CPU_HEADER(timer) +#include #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS #include @@ -136,6 +144,11 @@ Timer *timer_abort(Timer *timer) */ void timer_delay(time_t time) { +#if defined(IRQ_GETSTATE) + /* We shouldn't sleep with interrupts disabled */ + ASSERT(IRQ_GETSTATE()); +#endif + #if defined(CONFIG_KERN_SIGNALS) && CONFIG_KERN_SIGNALS Timer t;