/[gcl]/gcl/o/cmpaux.c
ViewVC logotype

Diff of /gcl/o/cmpaux.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by camm, Mon Jul 29 22:50:54 2002 UTC revision 1.7 by camm, Mon Nov 11 03:43:06 2002 UTC
# Line 282  object_to_string(object x) Line 282  object_to_string(object x)
282     where f1 f2 are forms to be evaled.     where f1 f2 are forms to be evaled.
283  */  */
284    
285    #ifdef CLEAR_CACHE
286    static int
287    sigh(int sig,long code,void *scp, char *addr) {
288    
289        fprintf(stderr,"Received SIGILL at %p\n",((siginfo_t *)code)->si_addr);
290        exit(1);
291    }
292    #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
299     static sigaction sa={{sigh},{{0}},SA_RESTART|SA_SIGINFO,NULL);
300     static sigset_t ss;
301    
302     sigaction(SIGILL,&sa,NULL);
303     sigemptyset(&ss);
304     sigaddset(&ss,SIGILL);
305     sigprocmask(SIG_BLOCK,&ss,NULL);
306    #endif
307    
308    
309    check_type(fasl_vec,t_vector);    check_type(fasl_vec,t_vector);
310    form=(fasl_vec->v.v_self[fasl_vec->v.v_fillp -1]);    form=(fasl_vec->v.v_self[fasl_vec->v.v_fillp -1]);
# Line 302  call_init(int init_address, object memor Line 321  call_init(int init_address, object memor
321       form->c.c_car == sSPinit)       form->c.c_car == sSPinit)
322     {bds_bind(sSPinit,fasl_vec);     {bds_bind(sSPinit,fasl_vec);
323      bds_bind(sSPmemory,memory);      bds_bind(sSPmemory,memory);
324    #ifdef CLEAR_CACHE
325        sigprocmask(SIG_UNBLOCK,&ss,NULL);
326    #endif
327      (*at)();      (*at)();
328    #ifdef CLEAR_CACHE
329        sigprocmask(SIG_BLOCK,&ss,NULL);
330    #endif
331      bds_unwind1;      bds_unwind1;
332      bds_unwind1;      bds_unwind1;
333    }    }
# Line 310  call_init(int init_address, object memor Line 335  call_init(int init_address, object memor
335     /* 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. */
336     {memory->cfd.cfd_self = fasl_vec->v.v_self;     {memory->cfd.cfd_self = fasl_vec->v.v_self;
337      memory->cfd.cfd_fillp = fasl_vec->v.v_fillp;      memory->cfd.cfd_fillp = fasl_vec->v.v_fillp;
338    #ifdef CLEAR_CACHE
339        sigprocmask(SIG_UNBLOCK,&ss,NULL);
340    #endif
341      (*at)(memory->cfd.cfd_start, memory->cfd.cfd_size, memory);      (*at)(memory->cfd.cfd_start, memory->cfd.cfd_size, memory);
342    #ifdef CLEAR_CACHE
343        sigprocmask(SIG_BLOCK,&ss,NULL);
344    #endif
345  }}  }}
346    
347  /* 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
# Line 419  init_or_load1(void (*fn)(void),char *fil Line 450  init_or_load1(void (*fn)(void),char *fil
450    {printf("loading %s\n",file); fflush(stdout);  load(file);}    {printf("loading %s\n",file); fflush(stdout);  load(file);}
451  }  }
452    
     
   
     
     
       
     
     
   
   
       
       
     

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26