[M3devel] why not thr_suspend on Solaris?

Tony Hosking hosking at cs.purdue.edu
Tue Nov 17 15:36:35 CET 2009


On 16 Nov 2009, at 23:42, Jay K wrote:

> Why not? Wouldn't that seem to make things kind of more similar  
> across more systems?
> And use thr_stksegment to get the stack boundaries?

These are not as accurate as the stack pointer we get using  
SaveRegsInStack.  So, you'll end up scanning more (unused) parts of  
the stack.
The signal-based mechanism is the most portable way to get an accurate  
stack pointer.  It should be preferred except in situations where it  
doesn't work (crappy Open/FreeBSD pthread implementations, and Mach- 
based systems like Darwin/Mac OS X where signal ends up implemented as  
an explicit suspend/resume in the OS so we might as well do it  
ourselves -- not to mention lack of sem_init).

>
>  - Jay
>
> From: hosking at cs.purdue.edu
> To: jkrell at elego.de
> Date: Mon, 16 Nov 2009 21:27:34 -0500
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
>
> Please don't use suspend, etc. for Solaris.
>
> On 17 Nov 2009, at 01:25, Jay Krell wrote:
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 09/11/17 01:25:20
>
> Modified files:
> cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c
>
> Log message:
> ThreadPThread__SuspendThread and ThreadPThread__RestartThread are
> identical for OpenBSD and FreeBSD, don't duplicate them
> (we can probably use same for others such as NetBSD, Irix, AIX,
> and almost the same for Solaris)
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091117/f7e1fa19/attachment-0002.html>


More information about the M3devel mailing list