<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Eliot,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> Hi Jaromir,</p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> On Sat, Jan 22, 2022 at 3:57 AM Jaromir Matas <mail at jaromir.net> wrote:</p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">> > Hi Eliot,</p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">> > I’d like to test it but the build failed for Windows and Mac; not sure</p>
<p class="MsoNormal">> > what it means…</p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">> > Sorry to hear the current “incorrect” suspend behavior has been exploited</p>
<p class="MsoNormal">> > more than expected in the existing code.</p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> It's not the incorrect suspend behaviour that's being exploited, it's the</p>
<p class="MsoNormal">> return value of suspend.  Existing code appears to depend on the</p>
<p class="MsoNormal">> semaphore/mutex a process is blocked on being answered by suspend.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yes, that's what I meant, actually :) I understand knowing the list was vital to e.g. recognize whether the process was blocked or runnable (#releaseCriticalSection).</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> What would you think about having primitiveSuspendV2 return self instead of</p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> > any list at all – to make all state changing methods answer consistently</p>
<p class="MsoNormal">> > (like e.g. VW do)… if the answer expected by the “affected” code base has</p>
<p class="MsoNormal">> > to be provided by primitiveSuspend anyways.</p>
<p class="MsoNormal">> ></p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> I don't see this is at all useful.  If one isn't interested in the</p>
<p class="MsoNormal">> semaphore/mutex return value one does not have to examine it.  But there is</p>
<p class="MsoNormal">> no way of getting the list once the process has been removed from it other</p>
<p class="MsoNormal">> than by having the suspend primitive answer it.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Well yes, it surely is more useful to return something in addition to the powerful side effect :) I was just wondering if it's not a "temptation" to be better avoided. I suggested in another post the list is still available on the suspendedContext's
 stack should someone really want it. But I'm just inquiring here to satisfy my curiosity, sorry.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">> So if one isn't interested in the return value simply write something of</p>
<p class="MsoNormal">> the form</p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">>     aProcess suspend; yourself</p>
<p class="MsoNormal">><o:p> </o:p></p>
<p class="MsoNormal">> But if one *is* interested in the result then the primitive better</p>
<p class="MsoNormal">> answer it, nbo?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Oh, if there's a use case even with the new primitiveSuspendV2 then no doubt.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks again for sharing your thoughts!</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jaromir</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Vm-dev <vm-dev-bounces@lists.squeakfoundation.org> on behalf of Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Sent:</b> Sunday, January 23, 2022 12:33:08 AM<br>
<b>To:</b> Open Smalltalk Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org><br>
<b>Subject:</b> Re: [Vm-dev] VM Maker: VMMaker.oscog-eem.3142.mcz</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"> </div>
</span></font></div>
</body>
</html>