<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">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</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 &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On Wed, Apr 1, 2015 at 6:27 AM, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
&gt;<br>
&gt; On 31.03.2015, at 23:10, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;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>
&gt;&gt; [...]<br>
&gt;&gt;   One of the advantages the process switch versions have is in not updating the receiving context sp there&#39;s a chance the context-to-stack mapping machinery won&#39;t flush the context to the heap.  In the end it might actually be faster.<br>
&gt;<br>
&gt; I would find it very surprising if #jump would result in the execution continuing in a different process.<br>
&gt;<br>
&gt; That&#39;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&#39;t want to jump to a process but within a process, like a goto…<br></blockquote><div><br></div><div>Well, jump doesn&#39;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>&quot;Abandon thisContext and resume self instead (using the same current process).&quot;</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>