From 9285b53303db99bc8ae58a1b07ccd4b5bacbe1e3 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Wed, 12 Oct 2005 07:41:58 +0000 Subject: [PATCH] Move variable declarations to the beginning of functions. --- src/c/threads.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/c/threads.d b/src/c/threads.d index ff3cdb09a..14827287f 100644 --- a/src/c/threads.d +++ b/src/c/threads.d @@ -114,10 +114,9 @@ thread_entry_point(cl_object process) } @(defun mp::make-process (&key name ((:initial-bindings initial_bindings) Ct)) -@ cl_object process; cl_object hash; - +@ process = cl_alloc_object(t_process); process->process.active = 0; process->process.name = name; @@ -257,6 +256,7 @@ mp_process_run_function(cl_narg narg, cl_object name, cl_object function, ...) @(defun mp::make-lock (&key name) pthread_mutexattr_t attr; + cl_object output; @ pthread_mutexattr_init(&attr); #if defined(__APPLE__) @@ -264,7 +264,7 @@ mp_process_run_function(cl_narg narg, cl_object name, cl_object function, ...) #else pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); #endif - cl_object output = cl_alloc_object(t_lock); + output = cl_alloc_object(t_lock); output->lock.name = name; pthread_mutex_init(&output->lock.mutex, &attr); pthread_mutexattr_destroy(&attr);