While AFAIK there's no way to prevent it from occurring through the RTLinux kernel, there are several ways to have your own thread detect the situation. The most basic is to construct a mutex whose state is "set" when a thread starts and "reset" when it ends. Then if your thread starts and finds it "set", it can terminate immediately. If you need the second thread to delay until the first is finished, RTLinux supports real-time semaphores which can be used to have the second thread started automatically as soon as the first surrenders the semaphore, presumably just before it exits.
Norm ----- Original Message ----- From: Murillo-Garcia Raul <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 9:59 AM Subject: [rtl] thread overrun > Hi there > I apologise if this question has already been posted but I'm new in this > list. > I have an application that supports multiple real-time threads that run at > rates specified by the user. If these rates are very large the computer > crashes. My hypothesis is that a thread is invoked before it is finished > since the execution time is larger that the thread period. Is there any > mechanism to prevent this from happening. I tried with a watchdog thread > with the highest priority but it didn't seem to work. > many thanks in advance > -- [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/ > -- [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/