#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <sched.h>
#include <signal.h>
#include <stddef.h>
* whatever other bookkeeping needs to be done
*/
+#ifdef LISP_FEATURE_SB_THREAD
int
new_thread_trampoline(struct thread *th)
{
th->state=STATE_RUNNING;
return funcall0(function);
}
+#endif /* LISP_FEATURE_SB_THREAD */
/* this is called from any other thread to create the new one, and
* initialize all parts of it that can be initialized from another
th->pid=kid_pid; /* child will not start until this is set */
}
-pid_t create_initial_thread(lispobj initial_function) {
+void create_initial_thread(lispobj initial_function) {
struct thread *th=create_thread_struct(initial_function);
pid_t kid_pid=getpid();
if(th && kid_pid>0) {
} else lose("can't create initial thread");
}
-#ifdef LISP_FEATURE_LINUX
+#ifdef LISP_FEATURE_SB_THREAD
pid_t create_thread(lispobj initial_function) {
struct thread *th=create_thread_struct(initial_function);
pid_t kid_pid=clone(new_thread_trampoline,