1 (clines "#include <pthread.h>")
3 (clines "#define inheap(pp) ((char *)(pp) < heap_end)")
4 (clines "static object code_for_eval_code;")
6 (defcfun "static object staticp (object array)" 0
7 "if (inheap (array->st.st_self)) return Ct;"
10 (defcfun "static void *eval_code (void *parameter)" 0
11 (eval code_for_eval_code))
13 (defcfun "int run_thread (object code)" 0
16 "code_for_eval_code = code;"
17 "ret = pthread_create (&tid, NULL, eval_code, NULL);"
20 (defcfun "int runprocess (object code)" 0
31 (defentry run-thread2 (object) (int "run_thread"))
32 (defentry staticp (object) (object "staticp"))
33 (defentry run-process (object) (int "runprocess"))
35 (defun run-thread (code)
36 (and (staticp code) (run-thread2 code)))