mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-09 22:50:34 -07:00
portability: repair builds for --enable-threads=no
A few blocks were not guarded with #ifdef ECL_THREADS ... #endif
This commit is contained in:
parent
b9ea8ac6ac
commit
4366fac6ad
2 changed files with 6 additions and 0 deletions
|
|
@ -181,7 +181,9 @@ ecl_init_env(cl_env_ptr env)
|
|||
env->slot_cache = ecl_make_cache(3, 4096);
|
||||
env->interrupt_struct = ecl_alloc(sizeof(*env->interrupt_struct));
|
||||
env->interrupt_struct->pending_interrupt = ECL_NIL;
|
||||
#ifdef ECL_THREADS
|
||||
ecl_mutex_init(&env->interrupt_struct->signal_queue_lock, FALSE);
|
||||
#endif
|
||||
{
|
||||
int size = ecl_option_values[ECL_OPT_SIGNAL_QUEUE_SIZE];
|
||||
env->interrupt_struct->signal_queue = cl_make_list(1, ecl_make_fixnum(size));
|
||||
|
|
@ -208,7 +210,9 @@ _ecl_dealloc_env(cl_env_ptr env)
|
|||
* a lisp environment set up -- the allocator assumes one -- and we
|
||||
* may have already cleaned up the value of ecl_process_env()
|
||||
*/
|
||||
#ifdef ECL_THREADS
|
||||
ecl_mutex_destroy(&env->interrupt_struct->signal_queue_lock);
|
||||
#endif
|
||||
#if defined(ECL_USE_MPROTECT)
|
||||
if (munmap(env, sizeof(*env)))
|
||||
ecl_internal_error("Unable to deallocate environment structure.");
|
||||
|
|
|
|||
|
|
@ -150,7 +150,9 @@ struct cl_env_struct {
|
|||
struct ecl_interrupt_struct {
|
||||
cl_object pending_interrupt;
|
||||
cl_object signal_queue;
|
||||
#ifdef ECL_THREADS
|
||||
ecl_mutex_t signal_queue_lock;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue