<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<DIV>> Huh? Should already be done?</DIV>
<BR>Could be.<BR><BR> > I do have make/get/set/swapcontext synthesized from setjmp/longjmp<BR>
> on some OpenBSD platforms, like ppc/x86.<BR> > These are available for OpenBSD already. Not sure why you synthesized.<BR>
<DIV> </DIV>
<DIV>Not that I see.</DIV>
<DIV>They probably don't scramble in setjmp/longjmp though? (else mine wouldn't work) but making setjmp work is almost the same work as building get/set/make/swapcontext on top of it, gotta poke around in the jmpbuf either way.</DIV>
<DIV> </DIV>
<DIV> - Jay<BR><BR> </DIV>
<HR id=stopSpelling>
From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Date: Wed, 21 Oct 2009 21:32:26 -0400<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR><BR>
<DIV><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV><SPAN class=ecxApple-style-span style="FONT-SIZE: medium">On 21 Oct 2009, at 20:12, Jay K wrote:</SPAN></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV></SPAN></DIV>
<DIV><BR class=ecxApple-interchange-newline>
<BLOCKQUOTE><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: medium Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=ecxhmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">ps: notice:<BR> <BR>>> resumed system calls will return an error value of EINTR<BR></DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Not a problem. We already cope with that in ThreadPThread.</DIV><BR>
<BLOCKQUOTE><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: medium Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=ecxhmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> We probably need to handle that in a bunch of places.<BR>But some things like read/write will return just having done a partial read/write?<BR></DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>Huh? Should already be done?</DIV><BR>
<BLOCKQUOTE><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: medium Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=ecxhmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> Maybe something more cooperative would be easier?<BR>Or even user threads??<BR>I do have make/get/set/swapcontext synthesized from setjmp/longjmp on some OpenBSD platforms, like ppc/x86.<BR></DIV></SPAN></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>These are available for OpenBSD already. Not sure why you synthesized.</DIV><BR>
<BLOCKQUOTE><SPAN class=ecxApple-style-span style="WORD-SPACING: 0px; FONT: medium Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV class=ecxhmmessage style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <BR> - Jay<BR> <BR>
<HR id=ecxstopSpelling>
From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A><BR>Date: Wed, 21 Oct 2009 21:07:09 +0000<BR>CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR><BR>Not sure how the formatting will come through..but yes.<BR>Hopefully on all processor architectures.<BR> <BR> <BR>"np" means "not portable", ok<BR> <BR> <BR><A href="http://www.openbsd.org/cgi-bin/man.cgi">http://www.openbsd.org/cgi-bin/man.cgi</A><BR> <BR>appropos suspend<BR> <BR><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386">http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386</A><BR> <BR><FONT color=#e00000></FONT>
<HR>
<PRE>PTHREAD_SUSPEND_NP(3) OpenBSD Programmer's Manual PTHREAD_SUSPEND_NP(3)
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=NAME><B>NAME</B></A>
<B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>, <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>, <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>,
<B>pthread</B><I>_</I><B>resume</B><I>_</I><B>all</B><I>_</I><B>np</B> - suspend and resume thread(s)
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=SYNOPSIS><B>SYNOPSIS</B></A>
<B>#include</B> <<B><A href="http://www.openbsd.org/cgi-bin/man.cgi/usr/include/pthread.h">pthread.h</A></B>>
<B>#include</B> <<B><A href="http://www.openbsd.org/cgi-bin/man.cgi/usr/include/pthread%3C/B%3E%3CI%3E_%3C/I%3E%3CB%3Enp.h">pthread</A></B><A href="http://www.openbsd.org/cgi-bin/man.cgi/usr/include/pthread%3C/B%3E%3CI%3E_%3C/I%3E%3CB%3Enp.h"><I>_</I><B>np.h</B></A><B></B>>
<I>int</I>
<B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>(<I>pthread_t</I> <I>thread</I>);
<I>void</I>
<B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>(<I>void</I>);
<I>int</I>
<B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>(<I>pthread_t</I> <I>thread</I>);
<I>void</I>
<B>pthread</B><I>_</I><B>resume</B><I>_</I><B>all</B><I>_</I><B>np</B>(<I>void</I>);
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=DESCRIPTION><B>DESCRIPTION</B></A>
The <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>() function interrupts the given thread and places
it in a suspended state.
The <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>() function interrupts all threads except the
current thread and places them in a suspended state.
The <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>() function resumes a thread suspended with
<B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>() or <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>().
The <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>all</B><I>_</I><B>np</B>() function resumes all threads suspended with
<B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>() or <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>().
The <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>() and <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>all</B><I>_</I><B>np</B>() functions have no ef-
fect on threads that have not been suspended.
Suspending and resuming a thread has an effect similar to that of receiv-
ing a signal, namely that resumed system calls will return an error value
of EINTR.
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=RETURN+VALUES><B>RETURN VALUES</B></A>
The <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>() and <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>() functions fail if:
[ESRCH] No thread could be found corresponding to that specified by
the given thread ID.
The <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>() function fails if:
[EDEADLK] Attempt to suspend the current thread.
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=SEE+ALSO><B>SEE ALSO</B></A>
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_cancel&sektion=3&arch=i386&apropos=0&manpath=OpenBSD+Current">pthread_cancel(3)</A>, <A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads&sektion=3&arch=i386&apropos=0&manpath=OpenBSD+Current">pthreads(3)</A>
<A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#end" name=STANDARDS><B>STANDARDS</B></A>
The <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>np</B>(), <B>pthread</B><I>_</I><B>suspend</B><I>_</I><B>all</B><I>_</I><B>np</B>(), <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>np</B>()
and <B>pthread</B><I>_</I><B>resume</B><I>_</I><B>all</B><I>_</I><B>np</B>() functions are non-portable and may not be
supported with the above semantics on other POSIX systems.
OpenBSD 4.5 May 31, 2007 1
</PRE><A name=end>
<HR>
</A><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#NAME">NAME</A><SPAN class=ecxApple-converted-space> </SPAN>|<SPAN class=ecxApple-converted-space> </SPAN><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#SYNOPSIS">SYNOPSIS</A><SPAN class=ecxApple-converted-space> </SPAN>|<SPAN class=ecxApple-converted-space> </SPAN><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#DESCRIPTION">DESCRIPTION</A><SPAN class=ecxApple-converted-space> </SPAN>|<SPAN class=ecxApple-converted-space> </SPAN><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#RETURN+VALUES">RETURN VALUES</A><SPAN class=ecxApple-converted-space> </SPAN>|<SPAN class=ecxApple-converted-space> </SPAN><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#SEE+ALSO">SEE ALSO</A><SPAN class=ecxApple-converted-space> </SPAN>|<SPAN class=ecxApple-converted-space> </SPAN><A href="http://www.openbsd.org/cgi-bin/man.cgi?query=pthread_resume_all_np&sektion=3&apropos=0&manpath=OpenBSD+Current&arch=i386#STANDARDS">STANDARDS</A><SPAN class=ecxApple-converted-space> </SPAN><BR> <BR> - Jay<BR><BR> <BR>
<HR id=ecxecxstopSpelling>
From:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR>To:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A><BR>Date: Wed, 21 Oct 2009 13:02:26 -0700<BR>CC:<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR><BR>
<DIV>OpenBSD has good documentation.. (man pages)<BR><BR> - Jay (phone<SPAN class=ecxecxecxApple-style-span>)</SPAN></DIV>
<DIV><BR>On Oct 21, 2009, at 11:05 AM, Olaf Wagner <<A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A>> wrote:<BR><BR></DIV>
<DIV></DIV>
<BLOCKQUOTE>
<DIV><SPAN>Stefan,</SPAN><BR><SPAN></SPAN><BR><SPAN>you are our OpenBSD fan, aren't you? Can you answer this?</SPAN><BR><SPAN></SPAN><BR><SPAN>Olaf</SPAN><BR><SPAN></SPAN><BR><SPAN>----- Forwarded message from<SPAN class=ecxApple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><SPAN class=ecxApple-converted-space> </SPAN>-----</SPAN><BR><SPAN> Date: Wed, 21 Oct 2009 12:06:12 -0400</SPAN><BR><SPAN> From: Tony Hosking <<A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A>></SPAN><BR><SPAN>Reply-To: Tony Hosking <<A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A>></SPAN><BR><SPAN>Subject: Re: [M3devel] Status of threads for RC4?</SPAN><BR><SPAN> To: Olaf Wagner <<A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A>></SPAN><BR><SPAN> Cc: Jay K <<A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A>>, m3devel <<A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A>></SPAN><BR><SPAN></SPAN><BR><SPAN>This is a known problem for the user-level pthreads on OpenBSD.</SPAN><BR><SPAN></SPAN><BR><SPAN>Quick question: does OpenBSD support pthread_suspend, pthread_resume?</SPAN><BR><SPAN>If so then we could work avoid the signals entirely (as we do on OS</SPAN><BR><SPAN>X). All that is needed is implementation of RTMachine.SuspendThread,</SPAN><BR><SPAN>RTMachine.ResumeThread and RTMachine.GetState for OpenBSD targets.</SPAN><BR><SPAN></SPAN><BR><SPAN>On 21 Oct 2009, at 10:04, Olaf Wagner wrote:</SPAN><BR><SPAN></SPAN><BR>
<BLOCKQUOTE><SPAN>Quoting Tony Hosking <<A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A>>:</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Yes, a C test can tell us if threads waiting on mutexes are able to</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>receive pthread_kill signals.</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Could you add such a simple test program somewhere in m3tests or</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>m3core/tests? We could also use that for a bug report to the</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>OpenBSD developers (they won't like to install m3 to reproduce</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>the error).</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Olaf</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>On 21 Oct 2009, at 03:21, Olaf Wagner wrote:</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Quoting Jay K <<A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A>>:</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Is it reasonable maybe to rewrite this test in C and see if it hangs?</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>ie. see if maybe it is an OpenBSD bug?</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>It doesn't hang with garbage collection turned off, so there must be</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>some unhealthy interaction between that and the thread implementation.</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>I don't think you will be able to narrow it down with a C test.</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Olaf</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>--<SPAN class=ecxApple-converted-space> </SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Olaf Wagner -- elego Software Solutions GmbH</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN><A href="http://www.elegosoft.com/">http://www.elegosoft.com</A><SPAN class=ecxApple-converted-space> </SPAN>| Geschäftsführer: Olaf Wagner | Sitz: Berlin</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194</SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>--<SPAN class=ecxApple-converted-space> </SPAN></SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Olaf Wagner -- elego Software Solutions GmbH</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN> <A href="http://www.elegosoft.com/">http://www.elegosoft.com</A><SPAN class=ecxApple-converted-space> </SPAN>| Geschäftsführer: Olaf Wagner | Sitz: Berlin</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194</SPAN><BR></BLOCKQUOTE>
<BLOCKQUOTE><SPAN></SPAN><BR></BLOCKQUOTE><SPAN></SPAN><BR><SPAN></SPAN><BR><SPAN></SPAN><BR><SPAN>----- End forwarded message -----</SPAN><BR><SPAN></SPAN><BR><SPAN></SPAN><BR><SPAN>--<SPAN class=ecxApple-converted-space> </SPAN></SPAN><BR><SPAN>Olaf Wagner -- elego Software Solutions GmbH</SPAN><BR><SPAN> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany</SPAN><BR><SPAN>phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95</SPAN><BR><SPAN> <A href="http://www.elegosoft.com/">http://www.elegosoft.com</A><SPAN class=ecxApple-converted-space> </SPAN>| Geschäftsführer: Olaf Wagner | Sitz: Berlin</SPAN><BR><SPAN>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194</SPAN><BR><SPAN></SPAN><BR></DIV></BLOCKQUOTE>
<BLOCKQUOTE>
<DIV>
<DIV><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV style="WORD-WRAP: break-word"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate"><SPAN class=ecxecxecxApple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<DIV><SPAN class=ecxecxecxApple-style-span style="FONT-SIZE: medium"><FONT class=ecxecxecxApple-style-span face="'Gill Sans'" color=#0000ff>This is a known problem for the user-level pthreads on OpenBSD.</FONT></SPAN></DIV>
<DIV><FONT class=ecxecxecxApple-style-span face="'Gill Sans'" color=#0000ff><SPAN class=ecxecxecxApple-style-span style="FONT-SIZE: medium"><BR></SPAN></FONT></DIV>
<DIV><FONT class=ecxecxecxApple-style-span face="'Gill Sans'" color=#0000ff><SPAN class=ecxecxecxApple-style-span style="FONT-SIZE: medium">Quick question: does OpenBSD support pthread_suspend, pthread_resume? If so then we could work avoid the signals entirely (as we do on OS X). All that is needed is implementation of RTMachine.SuspendThread, RTMachine.ResumeThread and RTMachine.GetState for OpenBSD targets.</SPAN></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 21 Oct 2009, at 10:04, Olaf Wagner wrote:</DIV><BR class=ecxecxecxApple-interchange-newline>
<BLOCKQUOTE>
<DIV>Quoting Tony Hosking <<A href="mailto:hosking@cs.purdue.edu"></A><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A>>:<BR><BR>
<BLOCKQUOTE>Yes, a C test can tell us if threads waiting on mutexes are able to<BR></BLOCKQUOTE>
<BLOCKQUOTE>receive pthread_kill signals.<BR></BLOCKQUOTE><BR>Could you add such a simple test program somewhere in m3tests or<BR>m3core/tests? We could also use that for a bug report to the<BR>OpenBSD developers (they won't like to install m3 to reproduce<BR>the error).<BR><BR>Olaf<BR><BR>
<BLOCKQUOTE>On 21 Oct 2009, at 03:21, Olaf Wagner wrote:<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Quoting Jay K <<A href="mailto:jay.krell@cornell.edu"></A><A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A>>:<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Is it reasonable maybe to rewrite this test in C and see if it hangs?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>ie. see if maybe it is an OpenBSD bug?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>It doesn't hang with garbage collection turned off, so there must be<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>some unhealthy interaction between that and the thread implementation.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>I don't think you will be able to narrow it down with a C test.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Olaf<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>--<SPAN class=ecxApple-converted-space> </SPAN><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Olaf Wagner -- elego Software Solutions GmbH<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><A href="http://www.elegosoft.com/"></A><A href="http://www.elegosoft.com/">http://www.elegosoft.com</A><SPAN class=ecxApple-converted-space> </SPAN>| Geschäftsführer: Olaf Wagner | Sitz: Berlin<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE><BR><BR><BR>--<SPAN class=ecxApple-converted-space> </SPAN><BR>Olaf Wagner -- elego Software Solutions GmbH<BR> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<BR>phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<BR> <A href="http://www.elegosoft.com/"></A><A href="http://www.elegosoft.com/">http://www.elegosoft.com</A><SPAN class=ecxApple-converted-space> </SPAN>| Geschäftsführer: Olaf Wagner | Sitz: Berlin<BR>Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<BR><BR></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV></SPAN><BR class=ecxApple-interchange-newline></BLOCKQUOTE></DIV><BR> </body>
</html>