temporary addition: signalling successful thread creation

(I take it the final implementation will provide something equivalent,
without such a check, failure to create the thread results in deadlock)
This commit is contained in:
Fischlurch 2009-01-02 08:01:51 +01:00
parent 2f34637088
commit 120fbf8f01

View file

@ -98,10 +98,11 @@ lumiera_thread_run (enum lumiera_thread_class kind,
pthread_mutex_lock (&threads_mutex);
pthread_t dummy;
pthread_create (&dummy, &attrs, pthread_runner, &thread);
int error = pthread_create (&dummy, &attrs, pthread_runner, &thread);
pthread_mutex_unlock (&threads_mutex);
if (error) return 0; /////TODO temporary addition by Ichthyo; probably we'll set lumiera_error?
return (LumieraThread) 1;
}