Re: [linux-audio-dev] non-RT thread waiting for RT thread

From: Jean-Marc Valin <Jean-Marc.Valin@email-addr-hidden>
Date: Mon Apr 25 2005 - 06:22:56 EEST

...
> I can't use a semaphore or condition variable for this,
> because that
> would mean the low priority thread must briefly take a
> lock while
> examining the condition variable or sempahore.

Actually, I believe a semaphore (POSIX 1003.1b) is safe for your
application. In the man page, it is said that sem_post is async signal
safe, which means it doesn't take any form of lock.

        Jean-Marc

-- 
Jean-Marc Valin <Jean-Marc.Valin@email-addr-hidden>
Université de Sherbrooke
Received on Mon Apr 25 08:15:08 2005

This archive was generated by hypermail 2.1.8 : Mon Apr 25 2005 - 08:15:09 EEST