[M3devel] why not thr_suspend on Solaris?

jay.krell at cornell.edu jay.krell at cornell.edu
Tue Nov 17 20:00:27 CET 2009


Oh scanning the entire stack, including unused part, not good, agreed.  
Squatting on a signal seems not great -- the whole notion of a few  
user signals seems problematic. There's no "authority" to control  
allocation of them. Darwin does have Mach semaphores.

  - Jay (phone)

On Nov 17, 2009, at 6:36 AM, Tony Hosking <hosking at cs.purdue.edu> wrote:

> 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/cb5cfcee/attachment-0002.html>


More information about the M3devel mailing list