<p>I forgot to mark the patch in which this email is a reply to as RFC, input is more than welcome even though the Subject lacks the acronym.</p>
<p>On 16/08/05 21:02, Filip Roséen wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Prior to this patch the while-loop in src/misc/threads.c:mwait would
keep on spinning until the deadline has been reached, no matter if
vlc_addr_timedwait woke up due to the thread being canceled.
This commit makes sure that we check whether or not the thread has
been canceled, through vlc_testcancel, when vlc_addr_timedwait returns
(in order to also take spurious wake-ups into account).</code></pre>
</blockquote>
<h3 id="elaboration-of-commit-message">Elaboration of commit message</h3>
<p>Given the loop in <code>src/misc/threads.c:mwait</code> I assumed that it was put in place to account for spurious wake-ups. The documentation associated with <code>vlc_addr_timedwait</code> does however <em>not</em> include notion of such.</p>
<p>With the above in mind, if the patch in question is satisfying we should probably update the documentation of <code>vlc_addr_timedwait</code>, if not; remove the loop in <code>src/misc/threads.c:mwait</code> and make sure that each implementation of <code>vlc_addr_timedwait</code> internally take spurious wake-ups into account.</p>
<ul>
<li>What are your thoughts?</li>
</ul>
<hr style="height:1px;margin-bottom:20px;background-color:#ddd;color:#ddd" />
<p>Disregarding the fact that I forgot to mark the patch as RFC, I also failed to include a little ascii-art for the masses (I mean.. it’s friday).</p>
<pre><code> __ __ _______ _______ _______ __ __
| | | | _ | | | | | |
| |_| | |_| | _ | _ | |_| |
| | | |_| | |_| | |
| | | ___| ___|_ _|
| _ | _ | | | | | |
|__| |__|__| |__|___| |___| |___|
_ _ _______ _______ ___ _ _______ __ _ ______
| | _ | | | | | | | | | | | |
| || || | ___| ___| |_| | ___| |_| | _ |
| | |___| |___| _| |___| | | | |
| | ___| ___| |_| ___| _ | |_| |
| _ | |___| |___| _ | |___| | | | |
|__| |__|_______|_______|___| |_|_______|_| |__|______|
/* my mind is a little bit too tired to think of a suitable animal/object,
sorry for the "boring" message... Have a great weekend! */</code></pre>