[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [rtl] Help after Segmentation fault



> rmmod: rt_fifo_new: Device or resource busy
> 
> So far I've been rebooting the computer to clear the problem.
> 

The short answer is "back door command"

I had the same problem with a standard Linux driver I
am working on.  rmmod will not unload a module with a
use count > 0.  the close function decrements the count
but due to an error in my code I couldn't close the
device.

What I did was code in a "backdoor" suicide command
I have an ioctl called "die" now that always works.

With RT modules, I have one task that accepts commands
from an RT fifo and sets global memory seen by other
tasks.  That is all it does -- just hang on a FIFO.
I have a command "terminate".  Now I can do 
echo "terminate" | cat /dev/rtfifo3 and the RT module
is gone.

Software bugs happen, just plan for them.  
-- 
--Chris Albertson

  chris@topdog.logicon.com                Voice:  626-351-0089  X127
  Logicon RDA, Pasadena California          Fax:  626-351-0699
--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/