paragc.c
Go to the documentation of this file.
00001 #if Solaris2
00002 static pmark(p)
00003 register pointer p;
00004 { pointer gcstack[32768];
00005 /*  fprintf(stderr, "pmark: th=%d p=%x\n", thr_self(), p); */
00006   mark(p,gcstack);}
00007 
00008 static pmarkcontext(ctx)
00009 register context *ctx;
00010 { register pointer *p;
00011   pointer gcstack[32768];
00012   for (p=ctx->stack; p<ctx->vsp; p++)
00013     if (ispointer(*p) && 
00014             ((ctx->stack> (pointer *)*p) || ((pointer *)*p>ctx->stacklimit)))
00015         {  mark(*p,gcstack); } ;
00016   mark(ctx->lastalloc,gcstack);}
00017 
00018 static pmarkall()
00019 { register pointer p;
00020   register int i=0,j=0;
00021   register context *ctx;
00022   thread_t tid[512];
00023   thr_create(0, 150*1024, pmark, sysobj, THR_BOUND, &tid[j++]);
00024 /*  p=pkglist;
00025   while (p!=NIL) {
00026     thr_create(0, 150*1024, pmark, ccar(p), THR_BOUND, &tid[j++]);
00027     p=ccdr(p);} */
00028   thr_create(0, 150*1024, pmark, pkglist, THR_BOUND, &tid[j++]);
00029   for (i=0; i<MAXTHREAD; i++) {
00030     if (ctx=euscontexts[i]) 
00031       thr_create(0, 150*1024, pmarkcontext, ctx, THR_BOUND, &tid[j++]);
00032     }
00033   for (i=0; i<MAXCLASS; i++) {
00034     p=classtab[i].def;
00035     if (p && ispointer(p)) pmark(p); }
00036   /* pmark(pkglist); */
00037   if (debug) fprintf(stderr, ";; gc-threads=%d\n", j);
00038   for (i=0; i<j; i++) thr_join(tid[i], 0, 0);
00039   }
00040 #endif
00041 
00042 
00043 /*#if Solaris2
00044   if (spevalof(QPARAGC)==NIL)  markall();
00045   else pmarkall();
00046   #else
00047   #endif */
00048 
00049 


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Sep 3 2015 10:36:20