0.9.13.3:
[sbcl.git] / src / runtime / thread.c
index 821e4a2..bedab33 100644 (file)
@@ -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 <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#ifndef LISP_FEATURE_WIN32
 #include <sched.h>
+#endif
 #include <signal.h>
 #include <stddef.h>
 #include <errno.h>
 #include <sys/types.h>
+#ifndef LISP_FEATURE_WIN32
 #include <sys/wait.h>
+#endif
 
-#include "sbcl.h"
 #include "runtime.h"
 #include "validate.h"           /* for CONTROL_STACK_SIZE etc */
 #include "alloc.h"
 #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);