282 |
where f1 f2 are forms to be evaled. |
where f1 f2 are forms to be evaled. |
283 |
*/ |
*/ |
284 |
|
|
285 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
286 |
static int |
/* static int */ |
287 |
sigh(int sig,long code,void *scp, char *addr) { |
/* sigh(int sig,long code,void *scp, char *addr) { */ |
288 |
|
|
289 |
fprintf(stderr,"Received SIGILL at %p\n",((siginfo_t *)code)->si_addr); |
/* fprintf(stderr,"Received SIGILL at %p\n",((siginfo_t *)code)->si_addr); */ |
290 |
exit(1); |
/* exit(1); */ |
291 |
} |
/* } */ |
292 |
#endif |
/* #endif */ |
293 |
|
|
294 |
void |
void |
295 |
call_init(int init_address, object memory, object fasl_vec, FUNC fptr) |
call_init(int init_address, object memory, object fasl_vec, FUNC fptr) |
296 |
{object form; |
{object form; |
297 |
FUNC at; |
FUNC at; |
298 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
299 |
static int n; |
/* static int n; */ |
300 |
static sigset_t ss; |
/* static sigset_t ss; */ |
301 |
|
|
302 |
if (!n) { |
/* if (!n) { */ |
303 |
struct sigaction sa={{(void *)sigh},{{0}},SA_RESTART|SA_SIGINFO,NULL}; |
/* struct sigaction sa={{(void *)sigh},{{0}},SA_RESTART|SA_SIGINFO,NULL}; */ |
304 |
|
|
305 |
sigaction(SIGILL,&sa,NULL); |
/* sigaction(SIGILL,&sa,NULL); */ |
306 |
sigemptyset(&ss); |
/* sigemptyset(&ss); */ |
307 |
sigaddset(&ss,SIGILL); |
/* sigaddset(&ss,SIGILL); */ |
308 |
sigprocmask(SIG_BLOCK,&ss,NULL); |
/* sigprocmask(SIG_BLOCK,&ss,NULL); */ |
309 |
n=1; |
/* n=1; */ |
310 |
} |
/* } */ |
311 |
#endif |
/* #endif */ |
312 |
|
|
313 |
|
|
314 |
check_type(fasl_vec,t_vector); |
check_type(fasl_vec,t_vector); |
326 |
form->c.c_car == sSPinit) |
form->c.c_car == sSPinit) |
327 |
{bds_bind(sSPinit,fasl_vec); |
{bds_bind(sSPinit,fasl_vec); |
328 |
bds_bind(sSPmemory,memory); |
bds_bind(sSPmemory,memory); |
329 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
330 |
sigprocmask(SIG_UNBLOCK,&ss,NULL); |
/* sigprocmask(SIG_UNBLOCK,&ss,NULL); */ |
331 |
#endif |
/* #endif */ |
332 |
(*at)(); |
(*at)(); |
333 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
334 |
sigprocmask(SIG_BLOCK,&ss,NULL); |
/* sigprocmask(SIG_BLOCK,&ss,NULL); */ |
335 |
#endif |
/* #endif */ |
336 |
bds_unwind1; |
bds_unwind1; |
337 |
bds_unwind1; |
bds_unwind1; |
338 |
} |
} |
340 |
/* old style three arg init, with all init being done by C code. */ |
/* old style three arg init, with all init being done by C code. */ |
341 |
{memory->cfd.cfd_self = fasl_vec->v.v_self; |
{memory->cfd.cfd_self = fasl_vec->v.v_self; |
342 |
memory->cfd.cfd_fillp = fasl_vec->v.v_fillp; |
memory->cfd.cfd_fillp = fasl_vec->v.v_fillp; |
343 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
344 |
sigprocmask(SIG_UNBLOCK,&ss,NULL); |
/* sigprocmask(SIG_UNBLOCK,&ss,NULL); */ |
345 |
#endif |
/* #endif */ |
346 |
(*at)(memory->cfd.cfd_start, memory->cfd.cfd_size, memory); |
(*at)(memory->cfd.cfd_start, memory->cfd.cfd_size, memory); |
347 |
#ifdef CLEAR_CACHE |
/* #ifdef CLEAR_CACHE */ |
348 |
sigprocmask(SIG_BLOCK,&ss,NULL); |
/* sigprocmask(SIG_BLOCK,&ss,NULL); */ |
349 |
#endif |
/* #endif */ |
350 |
}} |
}} |
351 |
|
|
352 |
/* statVV is the address of some static storage, which is used by the |
/* statVV is the address of some static storage, which is used by the |