<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-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="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" 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 type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" 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 type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" 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 type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> <br> - Jay<br> <br><hr id="stopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>To:<span class="Apple-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="Apple-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 noshade=""></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="Apple-converted-space"> </span>|<span class="Apple-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="Apple-converted-space"> </span>|<span class="Apple-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="Apple-converted-space"> </span>|<span class="Apple-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="Apple-converted-space"> </span>|<span class="Apple-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="Apple-converted-space"> </span>|<span class="Apple-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="Apple-converted-space"> </span><br> <br> - Jay<br><br> <br><hr id="ecxstopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>To:<span class="Apple-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="Apple-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="ecxecxApple-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="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><span class="Apple-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="Apple-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="Apple-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="Apple-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="Apple-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="Apple-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="Apple-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="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal 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="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal 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="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><span class="ecxecxApple-style-span" style="word-spacing: 0px; font: normal normal normal 12px/normal Helvetica; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; "><div><span class="ecxecxApple-style-span" style="font-size: medium; "><font class="ecxecxApple-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="ecxecxApple-style-span" face="'Gill Sans'" color="#0000ff"><span class="ecxecxApple-style-span" style="font-size: medium; "><br></span></font></div><div><font class="ecxecxApple-style-span" face="'Gill Sans'" color="#0000ff"><span class="ecxecxApple-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="ecxecxApple-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="Apple-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="Apple-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="Apple-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="Apple-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="Apple-interchange-newline"></blockquote></div><br></body></html>