1 (clines "#include <pthread.h>")
2 (clines "#include <time.h>")
4 (clines "#define inheap(pp) ((char *)(pp) < heap_end)")
5 (clines "static object pepe;")
7 (defcfun "static object staticp (object array)" 0
8 "if (inheap (array->st.st_self)) return Ct;"
11 (defcfun "static void *eval_code (void *parameter)" 0
12 "int t = time (NULL);"
13 "while (time (NULL) - t < 10);"
16 (defcfun "int run_thread (object code)" 0
20 "ret = pthread_create (&tid, NULL, eval_code, NULL);"
23 ;(defentry eval-code (object) (void "eval_code"))
24 (defentry run-thread (object) (int "run_thread"))
25 (defentry staticp (object) (object "staticp"))
28 (and (staticp code) (run-thread code)))