Hi!
Sometimes, while creating an rt-application, i make
a mistake, so that an rt-task hangs in a while- or for-loop.
Consequence: rt_task_wait() is never reached, so that the machine
hangs completly.
I experienced, that it is even more important to
have an emergency exit for this situation instead of
having MMU-Support (like Pierre Cloutier suggested in his
recent posting).
So my idea is to have an interrupt service-routine (ISR) tied
to the interrupt-pin of the parallel port. When the system
hangs, then you only have to push a button connected to
the interrupt pin and the ISR will stop all RT-Tasks by
calling rt_suspend (except the linux idle-task). Then you can
(re)access standard linux and unload all rt-task.
An even better thing would be a sort of watchdog-timer:
1. The WDT-task has the highest priortiy.
2. it has a period of i.e. 5 seconds
3. every time it's fifo-handler (resided in kernel-mode) receices
a character, the WDT-task is rescheduled to 5 sec. later
4. a shell-script like "while true; do echo -n x > /dev/rtf0; sleep 1; done"
would ensure that the WDT-task is reseted about ever second.
5. If linux (lowest-RT-task) isn't scheduled for at least 5 seconds, then
something must have been gone wrong -> WDT-Task will stop all RT-Tasks
(execept the idle-task "linux", of course)
Is that a feasible way? Or did i forget to mention something?
--
-------------------------------------------------------------------
| Bernhard Kuhn (kuhn[at]lpr.ei.tum.de) O|||OO||OO| |
| Laboratory for Process Control and Real-Time Systems O|||O|O|O|O |
| Technische Universität München Tel.+49-89-289-23732 O|||OO||OO| |
| 80290 München, Germany Room 3944 Fax -23555 OOO|O|||O|O |
--------------------------------------------------------------------
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/