After posting I performed a two tests, first using an RTDM event and then using a semaphore as described below. The synchronization worked in both cases, but I think I have another problem. On exit my test application generates a segmentation fault, but only occasionally. I do not get a stack dump in the kernel log and the system does not seem to become unstable. I tried running my test application under strace and gdb. In both cases I could not reproduce the error. I am installing the latest version of Xenomai and adding debugging options to the build. I will post when I know more.

Any suggestions on which Xenomai and kernel options to set for debugging?

Thanks,
Sean

Sebastian Smolorz wrote:
Am Freitag 14. April 2006 16:30 schrieb Sean McGranaghan:

  
I am writing an RTDM driver that needs a simple task suspend/resume. I
have a simple ioctl() that needs to initiate some io and then sleep
until an interrupt occurs. I have been trying to use rt_task_suspend()
and rt_task_resume().
    

Try to avoid using skin functions other than those of RTDM inside drivers. 
Your problem can be solved with a semaphore with an initial value of 0. A  
rtdm_sem_down will make your task sleep. Inside the interrupt handler a 
rtdm_sem_up will wake up your task (after the interrupt handler has exited).

Sebastian


  
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to