<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Tony,<BR>
I understand "as long as OpenBSD pthreads is userthreads, we might as well use our own" but I don't understand "pthread threading is unlikely to work on OpenBSD". Shouldn't it work pretty ok actually? Except for the suspend/resume stuff?<BR>
It should be easy to have OpenBSD custom stuff like Darwin has custom stuff, right?<BR>
<BR>
<BR>
I was of the impression that the stack could merely be heap allocated, but perhaps it takes more than that?<BR>
get/set/make/swapcontext are not available as far as I know on OpenBSD, but I do have them working on OpenBSD/x86 and OpenBSD/ppc (no OpenBSD/ppc currently to test on, but not a big deal to bring up it and others).<BR>
<BR>
<BR>
Regarding Windows I did remove the idle thread cache, which is good and bad.<BR>
The removal was mismotivated, and it might be a good thing, might be a bad thing.<BR>
<BR>
- Jay<BR><BR> <BR>
<HR id=stopSpelling>
CC: wagner@elegosoft.com; m3devel@elegosoft.com<BR>From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR>Date: Mon, 26 Oct 2009 10:07:55 -0400<BR><BR>
<DIV><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV><SPAN style="FONT-SIZE: medium" class=ecxApple-style-span><FONT class=ecxApple-style-span color=#0000ff face="'Gill Sans'">OpenBSD user-level threading should work one way (using getcontext/setcontext./swapcontext/makecontext if available there) or another (emulating these using setjmp/longjmp and a documented approach to synthesizing thread stacks using sigaltstack). Pthread threading is unlikely to work on OpenBSD until they fully support rthreads, but since OpenBSD pthreads are user-level we might as well use our own ThreadPosix implementation. I don't know if the old (current RC branch) ThreadPosix will work on OpenBSD or whether it would be worth moving to the much improved version I implemented this weekend which is now on trunk.</FONT></SPAN></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 26 Oct 2009, at 10:01, Jay K wrote:</DIV><BR class=ecxApple-interchange-newline>
<BLOCKQUOTE>
<DIV><BR>Windows threads should be ok for release..though..there is definitely divergence in head.<BR><BR>There was really just one main problem in Win32 threads, a copy/paste error I made a few months ago.<BR><BR>It is fixed in release.<BR><BR><BR><BR>OpenBSD we know the fix but not sure we'll get to it.<BR><BR><BR><BR>There are still problems with mentor and/or Juno and/or Trestle, all Windows specific.<BR><BR>To some extent there are problems going back years, but things seem to be much worse lately.<BR><BR>I'm still investigating.<BR><BR><BR><BR>- Jay<BR><BR><BR>
<BLOCKQUOTE>Date: Mon, 26 Oct 2009 13:49:24 +0100<BR></BLOCKQUOTE>
<BLOCKQUOTE>From: <A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A><BR></BLOCKQUOTE>
<BLOCKQUOTE>To: <A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A><BR></BLOCKQUOTE>
<BLOCKQUOTE>CC: <A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR></BLOCKQUOTE>
<BLOCKQUOTE>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>Quoting Jay K <<A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A>>:<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>WIndows threads are ok.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>In the release branch, too?<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>OpenBSD are not currently=2C never have been.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>Do we have a work-around or are we going to ignore this for the release?<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Windows problems are probably in Trestle.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Have been for many years apparently.<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>Do we wait for a fix here for RC4?<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>I can see that you and Tony are quite busy, but there are no visible<BR></BLOCKQUOTE>
<BLOCKQUOTE>changes for the release status.<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>Olaf<BR></BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>=20<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>- Jay<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>----------------------------------------<BR></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Date: Mon=2C 26 Oct 2009 10:35:08 +0100<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>From: <A href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</A><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>To: <A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>CC: <A href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</A>=3B <A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Subject: Re: [M3devel] Fwd: Re: Status of threads for RC4?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Hi again=2C<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>I'm still uncertain regarding the thread status. Hudson hasn't built<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>anything for about a month=2C so there have been no check-ins to the<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>release branch.<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>(1) Has the OpenBSD problem been fixed or worked around?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>If so=2C what are the relevant changes that should me merged from<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>trunk?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>The ChangeLog shows a lot of commits on head...<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>(2) Is there still a problem in Windows threads?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Or are we just chasing a general access violation due to an<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>unknown reason?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Again=2C is this ongoing or should some changes be merged for<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>the release?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Olaf<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Quoting Tony Hosking :<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>On 21 Oct 2009=2C at 20:12=2C Jay K wrote:<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>ps: notice:<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>resumed system calls will return an error value of EINTR<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Not a problem. We already cope with that in ThreadPThread.<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>We probably need to handle that in a bunch of places.<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>But some things like read/write will return just having done a<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>partial read/write?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Huh? Should already be done?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Maybe something more cooperative would be easier?<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>Or even user threads??<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>I do have make/get/set/swapcontext synthesized from setjmp/longjmp<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>on some OpenBSD platforms=2C like ppc/x86.<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>These are available for OpenBSD already. Not sure why you synthesized</BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></DIV></BLOCKQUOTE></DIV><BR> </body>
</html>