<div dir="ltr">Hi Andreas,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 19, 2014 at 2:52 PM, Andreas Wacknitz <span dir="ltr"><<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@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"> <br><div style="word-wrap:break-word">Hi Eliot,<div><br></div>
<div>Today I was able to work on this problem again. Alas heartbeat_handler() in sqUnixTimerHeartbeat.c is not called automatically as it should be.</div><div>Only if I trigger an external ALRM signal (by means of signal -ALRM <pid>) it’s being called. I wasn’t able to find out how the trigger for it is being</div>
<div>set. </div></div></blockquote><div><br></div><div>Hmmm. In sqUnixTimerHeartbeat.c::ioInitHeartbeat() there's a sigaction call that establishes heartbeat_handle as the handler for SIGALRM. Perhaps on FreeBSD or OpenSolaris you need to rearm the signal handler on each delivery? But perhaps there's a flag you can set in the sigaction that avoids having to do this.</div>
<div><br></div><div> </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"><div style="word-wrap:break-word">
<div>The only place I found a nanosleep() call was in block() in sqUnixMain.c.</div></div></blockquote><div><br></div><div>See the nanosleep in sqUnixHeartbeat.c::beatStateMachine.</div><div> </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">
<div style="word-wrap:break-word"><div>BTW what does with ticker and without ticker mean in respect to the heartbeat?</div></div></blockquote><div><br></div><div>The Qwaq/Teleplace/Terf VM needs support for sound processing. The ticker is the thread or call that provides cycles for sound processing.</div>
<div><br></div><div>But look, if FreeBSD provides pthreads you should try and use sqUnixHeartbeat.c instead of sqUnixTimerHeartbeat.c.</div><div><br></div><div>HTH,</div><div>Eliot</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">
<div style="word-wrap:break-word"><div><br></div><div>Best regards,</div><div>Andreas</div><div><br></div><div><div><div>Am 11.04.2014 um 18:02 schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Andreas, Hi Tty,<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 11, 2014 at 7:54 AM, Andreas Wacknitz <span dir="ltr"><<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@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"> <br><div style="word-wrap:break-word"><br><div><div>Am 10.04.2014 um 22:49 schrieb Colin Putney <<a href="mailto:colin@wiresong.com" target="_blank">colin@wiresong.com</a>>:</div>
<br><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 3:35 PM, gettimothy <span dir="ltr"><<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>></span> wrote:<br>
<div> </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"><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">
<div>I have considered Open Solaris and FreeBSD for my former dos partition--I don't know if CMake will work on them, but I will investigate. Do you have a link for open solaris? When I checked a few days ago Oracle had branded everything and I prefer to not deal with Ellison if I can.</div>
<div></div></div></blockquote></div><br></div><div class="gmail_extra">I did some work a while back to build Cog on SmartOS and OpenIndiana. I got it to compile and run, but the image couldn't do IO or respond to UI events. I've found VirtualBox handy for this sort of thing—you can get ready-made images for many operating systems, which saves installing and configuring a bare-metal installation. </div>
</div>
</blockquote></div>So you got as far as I did. After some thoughts I guess the heart beat Eliot introduced for Cog might be a possible cause of the problem.<div>When I did my first Solaris compilations of the Squeak VM a couple of years ago I had to adjust the signal handler installation. Solaris needs re-registration after a signal has been caught. I will take a look asap.</div>
</div></blockquote><div><br></div><div>Noe that the itemer/signal based heartbeat should be viewed as the heartbeat of last resort :-). It has bad effects when integrating with external code, interrupting system calls etc. Unless this external code is written to cope with interrupted calls that can't be restarted such as poll or select, the heartbeat needs to be disabled around calls to the external code.</div>
<div><br></div><div>Instead, the pthread/nanosleep based heartbeat (in platforms/unix/vm/sqUnixHeartbeat.c) is benign but does require multiple thread priorities in pthreads so that the heartbeat thread can run at a higher priority than the VM thread and hence reliably interrupt it.</div>
<div><br></div></div>-- <br>best,<div>Eliot</div>
</div></div>
</blockquote></div><br></div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>