[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


4.2 Condition Variables

As for mutexes, tis condition variables look just like DECthreads condition variables. You can statically initialize them using PTHREAD_COND_INITIALIZER or any of the non-portable DECthreads variants. You can assign names to your tis condition variables, for example, by statically initializing them with PTHREAD_COND_ INITWITHNAME().

Also as for mutexes, dynamic initialization of tis condition variables is limited by the absence of attributes objects.

Signalling or broadcasting a tis mutex when DECthreads isn't present does nothing. That's because you're not allowed to wait on a tis condition variable without DECthreads. Note that you can have more than one thread only if DECthreads is present; so if you waited, there would be no threads to wake you up.