From 120fbf8f01feb31d97d5eae4684fc3d502551813 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 2 Jan 2009 08:01:51 +0100 Subject: [PATCH] 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) --- src/backend/threads.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/threads.c b/src/backend/threads.c index 77f5bb45f..11f70ac7a 100644 --- a/src/backend/threads.c +++ b/src/backend/threads.c @@ -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; }