X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.c;h=0f28c30a3e7ba38f913add36ad5ed02445349b21;hb=5e291412ff095a2016388eee8ac265e12d565119;hp=2a174d69575ce2c015bbf0ff52770f1a635bec98;hpb=78fa16bf55be44cc16845be84d98023e83fb14bc;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 2a174d6..0f28c30 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -28,6 +28,7 @@ int dynamic_values_bytes=4096*sizeof(lispobj); /* same for all threads */ struct thread *all_threads; volatile lispobj all_threads_lock; extern struct interrupt_data * global_interrupt_data; +extern int linux_no_threads_p; int initial_thread_trampoline(struct thread *th) @@ -179,7 +180,8 @@ struct thread * create_thread_struct(lispobj initial_function) { bind_variable(INTERRUPT_PENDING, NIL,th); bind_variable(INTERRUPTS_ENABLED,T,th); - th->interrupt_data=os_validate(0,(sizeof (struct interrupt_data))); + th->interrupt_data = + os_validate(0,(sizeof (struct interrupt_data))); if(all_threads) memcpy(th->interrupt_data, arch_os_get_current_thread()->interrupt_data, @@ -229,9 +231,11 @@ void create_initial_thread(lispobj initial_function) { #ifdef LISP_FEATURE_SB_THREAD pid_t create_thread(lispobj initial_function) { - struct thread *th=create_thread_struct(initial_function); + struct thread *th; pid_t kid_pid=0; + if(linux_no_threads_p) return 0; + th=create_thread_struct(initial_function); if(th==0) return 0; kid_pid=clone(new_thread_trampoline, (((void*)th->control_stack_start)+