Is it possilbe to create more than one sleepon locks on one

Hi, Is it possilbe to create more than one sleepon locks on one thread?
Or anyway to create more than one lock signal in one thread?

Thanks!
Haitao Qiu

Haitao Qiu <hqiu@ee.ucr.edu> wrote:

Hi, Is it possilbe to create more than one sleepon locks on one thread?
Or anyway to create more than one lock signal in one thread?

At different places in a thread, you could do a pthread_sleepon_lock(),
but you can’t do a pthread_sleepon_lock() if you have already successfully
locked the sleepon mutex.

You could do a pthread_sleepon_wait() for different variables at
different places in a thread.

You could do a pthread_sleepon_signal() for different variables at
different places, or one right after another, if you modified several
different things – note one pthread_sleepon_lock() will make it
safe to modify and signal several different sleepon variables.

And, you can do a pthread_sleepon_broadcast() to wake up several
different other threads all waiting on the same sleepon variable.

Not sure if that answer your question exactly – the question didn’t
quite make sense to me, in the context of sleepons. If not, maybe
try posting a longer explanation of what you are trying to do…

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.