projects
/
bertos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
535ea94
)
timer_delay(): Add a sanity check to avoid sleeping forever.
author
bernie
<bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sun, 3 Oct 2004 18:48:01 +0000
(18:48 +0000)
committer
bernie
<bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Sun, 3 Oct 2004 18:48:01 +0000
(18:48 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@227
38d2e660
-2303-0410-9eaa-
f027e97ec537
drv/timer.c
patch
|
blob
|
history
diff --git
a/drv/timer.c
b/drv/timer.c
index c9c66832fda448b48e8f694db2ab8a624aa3b01d..c347deb56608c669029990f6c20a27f22878fc07 100755
(executable)
--- a/
drv/timer.c
+++ b/
drv/timer.c
@@
-15,6
+15,9
@@
/*#*
*#* $Log$
+ *#* 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.
*#*
@@
-139,6
+142,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;