<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 9:49 AM, Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
On 01.04.2015, at 18:37, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
<br>
> On Wed, Apr 1, 2015 at 6:27 AM, Bert Freudenberg <<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> wrote:<br>
><br>
> On 31.03.2015, at 23:10, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
>><br>
>> I'm not sure the other ways are any better. The way to transfer to a context without disturbing its stack is to do a process switch.<br>
>> [...]<br>
>> One of the advantages the process switch versions have is in not updating the receiving context sp there's a chance the context-to-stack mapping machinery won't flush the context to the heap. In the end it might actually be faster.<br>
><br>
> I would find it very surprising if #jump would result in the execution continuing in a different process.<br>
><br>
> That's not what they do. Instead they spawn another process to position the process in which we want to jump correctly.<br>
<br>
</div></div>We don't want to jump to a process but within a process, like a goto…<br></blockquote><div><br></div><div>Well, jump doesn't do unwinds so the code should be simply:</div><div><br></div><div><span class="im" style="font-size:13px"><div>jump</div><div><span style="white-space:pre-wrap">        </span>"Abandon thisContext and resume self instead (using the same current process)."</div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">        </span><span style="color:rgb(0,0,0)">| process |</span><br></div></span><div style="font-size:13px;color:rgb(0,0,0)"><span style="white-space:pre-wrap">        </span>process := Processor activeProcess.</div><div style="color:rgb(0,0,0);font-size:13px"><span style="white-space:pre-wrap">        </span>[process suspendedContext: self] fork.</div><div style="color:rgb(0,0,0);font-size:13px"><span style="white-space:pre-wrap">        </span>Processor yield</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
What about thread/process-local variables?<br></blockquote><div> </div><div>Happy now? </div></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>