mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-15 09:20:23 -07:00
Move variable declarations to the beginning of functions.
This commit is contained in:
parent
8399d27d19
commit
9285b53303
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue