fix: condition for signalling thread termination is optional

This commit is contained in:
Fischlurch 2009-06-05 05:04:45 +02:00
parent e0ff915987
commit b6d22bb2e0
2 changed files with 4 additions and 1 deletions

View file

@ -59,6 +59,9 @@ static void* pthread_runner (void* thread)
starter->fn (starter->arg);
if (!starter->finished)
return NULL; // no condition var provided for signalling thread termination
LUMIERA_RECCONDITION_SECTION(cond_sync, starter->finished)
LUMIERA_RECCONDITION_BROADCAST;

View file

@ -93,7 +93,7 @@
/**
* Wait for a condition.
* Must be used inside a RECCONDITION_SECTION.
* @param expr Conditon which must become true, else the condition variable goes back into sleep
* @param expr Condition which must become true, else the condition variable goes back into sleep
*/
#define LUMIERA_RECCONDITION_WAIT(expr) \
do { \