<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 10:13 PM, Emmanuel Dreyfus <span dir="ltr">&lt;<a href="mailto:manu@netbsd.org" target="_blank">manu@netbsd.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Anand Avati &lt;<a href="mailto:anand.avati@gmail.com">anand.avati@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I still don&#39;t understand how/why this change will help NetBSD<br>
<br>
</div>It ensures swapcontext() is operates on a context obtanined by<br>
getcontext() in the same thread.<br>
<br>
NetBSD considers the thread to be part of the context, and calling<br>
swapcontext() with a context obtained from another thread will preempt<br>
the other thread in order to execute synctask_wrap(). And here we break<br>
because synctask_get() will not retreive the approriate task, as it was<br>
set in thread specific storage of another thread.</blockquote><div><br></div><div>I wonder how this will impact multi-thread syncproc. You might want to #define SYNCENV_PROC_MAX to 1?</div><div><br></div><div>Avati</div>
<div><br></div></div>