Interrupts have to be explicitely activated at the thread entry point.

This commit is contained in:
Juan Jose Garcia Ripoll 2008-10-11 20:19:51 +02:00
parent 162b934fc4
commit e0100efe51
2 changed files with 10 additions and 0 deletions

View file

@ -202,6 +202,11 @@ static const struct {
cl_env_ptr
_ecl_alloc_env()
{
/*
* Allocates the lisp environment for a thread. Depending on which
* mechanism we use for detecting delayed signals, we may allocate
* the environment using mmap or the garbage collector.
*/
cl_env_ptr output;
#if defined(ECL_USE_MPROTECT)
output = mmap(0, sizeof(*output), PROT_READ | PROT_WRITE,
@ -211,6 +216,10 @@ _ecl_alloc_env()
#else
output = ecl_alloc(sizeof(*output));
#endif
/*
* An uninitialized environment _always_ disables interrupts. They
* are activated later on by the thread entry point or init_unixint().
*/
output->disable_interrupts = 1;
return output;
}

View file

@ -134,6 +134,7 @@ thread_entry_point(cl_object process)
ecl_init_env(env);
init_big_registers(env);
ecl_set_process_env(env);
ecl_enable_interrupts(env);
/* 2) Execute the code. The CATCH_ALL point is the destination
* provides us with an elegant way to exit the thread: we just