Sign in to follow this  
browny

RTLinux problem

Recommended Posts

Plz meet an extremely frustrated guy here :(. I have been working on developing a device driver for a school robotics project. The driver is basically divided into two parts, PWMC and OBHIJATRI. The OBHIJATRI invokes PWMC and both are made using RTLinux-3.1, patched with Kernel-2.4.29 (Gentoo). The "OBHIJATRI" is a job-based driver... which maintains a queue of jobs. To perform a job, it setups certain bit pattern in the parallel port and waits for certain period of time using "clock_nanosleep" and when there is no job to be performed.. it goes to sleep mode by "pthread_suspend_np." When the first job arrives.. "pthread_wakeup_np" is issued to wake up the sleeping thread. It must be mentioned that pthread_wakeup_np is called from "ioctl" function. *Now the question is, is it ok to use pthread_suspend_np and pthread_wakeup_np without IRQ interrupts. The reason i am writing this is because.. when i call the ioctl from user-space program.. SOMETIMES the whole system FREEZES :(. A lil juggling with the driver code used to solve the problem temporarily but again after rebooting the system, it would FREEZE and there would be no way other than "resetting" the computer :(. Everytime , a lil juggling with the code solves the problem.. but again reappears after rebooting.. which let me believe that SOMETHING IS HORRIBLY wrong somewhere else. I have already spent 2 long days.. but to no avail. Though i understand it may not be possible for you to find out the error by only reading this.. but plz suggest some "check-lists." And i would also love to hear in what possible cases ( for device drivers) the whole system might FREEZE. I am also very open to hear lectures on pitfalls of device driver programming. If you are interested to have the full source code of the driver.. just drop in ur email address. [Edited by - browny on November 11, 2005 12:12:13 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this