Hello, all.
My mouse and keyboard freeze when I call pthread_wakeup_np() from within
a hard interrupt service routine.  I am using RTLinux 3.0 with kernel
2.2.18 on a 1.5 GHz P4.  My project uses two RTLinux modules: The first
services hardware interrupts and transfers data from a DAQ board into an
mbuff.  The first module then wakes up a thread containied in a second
module which performs computations on the data.  Here is the basic
format:

**************
First module:     *
**************

extern pthread_t myThread;

unsigned int my_isr(unsigned int irq, struct pt_regs *regs) {
   /* perform hardware-related things here */
   rtl_hard_enable_irq(irq);
   pthread_wakeup_np(myThread);
}


***************
Second module:  *
***************

pthread_t myThread;

void *myEntryPoint(void *p) {
   while(1) {
      pthread_suspend_np(myThread);
      /* perform calculations here */
   }
}

When the interrupt rate is once every five milli-seconds, the mouse and
keyboard freeze within two to three seconds.   If I slow down the
hardware so that the interrupts come only once every six milli-seconds,
everything seems fine.  I timed the execution of the ISR at 50
micro-seconds.  So the CPU loading is only one percent.  The freezes
occur even if I comment out everything in the while-loop except for the
pthread_suspend_np().  The freezes do NOT occur if I comment out the
pthread_wakeup_np() from the ISR.  Any ideas?

Marvin

-
*********************************************
*         Dr. Marvin E. Germain             *
*         Zygo Corporation - Tucson AZ      *
*         [EMAIL PROTECTED]           *
*********************************************

----- End of forwarded message from [EMAIL PROTECTED] -----
-- [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/

Reply via email to