[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Sun Nov 22 22:53:44 CET 2009


The end of the stack isn't precise:

 

C:\dev2\cm3.release_branch_cm3_5_8\m3-libs\m3core\src\thread\POSIX\ThreadPosix.m3(1058):    self.stackbase := ADR(xx);

 

"stack" here:

 

void
ProcessContext(Context *c, void *stack,
        void (*p) (void *start, void *stop))
{
  if (stack < c->uc.uc_stack.ss_sp)
    p(stack, c->uc.uc_stack.ss_sp);
  else
    p(c->uc.uc_stack.ss_sp, stack);
#ifdef __APPLE__
  p(&(c->uc.uc_mcontext[0]), &(c->uc.uc_mcontext[1]));
#else
  p(&c[0], &c[1]);
#endif
}


 - Jay

 
> From: hosking at cs.purdue.edu
> Date: Sun, 22 Nov 2009 13:41:26 -0500
> To: jkrell at elego.de
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
> 
> > Note that ThreadPosix.m3 could also implement such precise stackbase.
> 
> ThreadPosix *does* implement a precise stack base. It's obtained from the ucontext set in the thread switch routine (swapcontext).
> 
> > ThreadPThread.m3 probably often could, like with the functions on OpenBSD (broken) and FreeBSD, etc.
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20091122/5b3467c1/attachment-0002.html>


More information about the M3commit mailing list