Re: pthread_suspend_np() and interrupt : system block
victor yodaiken <[email protected]> Mon, 28 Mar 2005 08:54:00 -0700
| Newsgroups | gmane.linux.real-time.rtlinux.general |
|---|---|
| Message-ID | <[email protected]> |
>From RTLinux's point of view, Linux is a single thread. So pthread_suspend_np called from Linux context suspends the entire Linux thread - including all Linx processes. You test routine should create a realtime thread that calls the driver - or if the call is intended to come from Linux/User, you need to use a Linux call to self-suspend. Also: I prefer sem_wait/sem_post to pthread_kill_np. On Sun, 2005-03-27 at 23:40 +0200, pm.boyer wrote: > Hi ! > > I am trying to test a RT-driver for audio card Ensoniq ES1371. > When i test the driver, the calling program which make a > write(fd,buffer,len) to the driver block all the rt-system, > when the write function do a pthread_suspend_np(pthread_self()) > > May be there is a mistake with the function pthread_suspend_np() > and the fact that there is an hardware interrupt handler conneted ? > > ( the driver write data to a DMA buffer, and when the DMA ring-buffer > become full, the driver must suspend themself to wait an interrupt > from the audio card which read and free the buffer, and > wake up the write function : > But before, when the write function enter in pthread_suspend_np() all > the system block : no activity in system, keyboard not respond ) > > Can you help me ? > > Thanks. > > > > > _______________________________________________ > Rtl mailing list > [email protected] > http://hq.fsmlabs.com/mailman/listinfo/rtl > http:/www.rtlinux-gpl.org/ -- Victor Yodaiken FSMLabs 505 838 9109 _______________________________________________ Rtl mailing list [email protected] http://hq.fsmlabs.com/mailman/listinfo/rtl http:/www.rtlinux-gpl.org/