X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.c;h=bedab334c9d75a465848b72f26ff21f4b2299ec8;hb=6cb4f9ea3f4e35a5a8e75922833e14575ae92180;hp=821e4a2202c1ef597b4bcc8476cd21ae93a0d4a2;hpb=b27fb452f72190637b03a6ef2e1333091da42a98;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index 821e4a2..bedab33 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -1,14 +1,30 @@ +/* + * This software is part of the SBCL system. See the README file for + * more information. + * + * This software is derived from the CMU CL system, which was + * written at Carnegie Mellon University and released into the + * public domain. The software is in the public domain and is + * provided with absolutely no warranty. See the COPYING and CREDITS + * files for more information. + */ + +#include "sbcl.h" + #include #include #include +#ifndef LISP_FEATURE_WIN32 #include +#endif #include #include #include #include +#ifndef LISP_FEATURE_WIN32 #include +#endif -#include "sbcl.h" #include "runtime.h" #include "validate.h" /* for CONTROL_STACK_SIZE etc */ #include "alloc.h" @@ -23,6 +39,14 @@ #include "interr.h" /* for lose() */ #include "gc-internal.h" +#ifdef LISP_FEATURE_WIN32 +/* + * Win32 doesn't have SIGSTKSZ, and we're not switching stacks anyway, + * so define it arbitrarily + */ +#define SIGSTKSZ 1024 +#endif + #define ALIEN_STACK_SIZE (1*1024*1024) /* 1Mb size chosen at random */ struct freeable_stack { @@ -79,7 +103,9 @@ initial_thread_trampoline(struct thread *th) if(arch_os_thread_init(th)==0) return 1; link_thread(th); th->os_thread=thread_self(); +#ifndef LISP_FEATURE_WIN32 protect_control_stack_guard_page(1); +#endif #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) return call_into_lisp_first_time(function,args,0);