<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 8:09 AM, Andreas Wacknitz <span dir="ltr">&lt;<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style="word-wrap:break-word">Hi Eliot,<div><br></div><div>Thanks again for your help.</div><div><br><div><div>
Am 21.04.2014 um 22:56 schrieb Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;:</div><br><blockquote type="cite"><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">&lt;<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@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"> <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 &lt;pid&gt;) 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&#39;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&#39;s a flag you can set in the sigaction that avoids having to do this.</div>
</div></div></div></blockquote>No, when I trigger SIGALRM from the outside the image works (albeit very slow). First I emitted SIGALRM by means of kill -SIGALRM &lt;pid&gt; from the shell; later I wrote a simple C program to do that for me :)</div>
<div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<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></div></blockquote>Yeah, I don’t know how I could miss this. I will debug a little bit in order to find out why this doesn’t work as expected on OpenSolaris.</div>
<div>After the initial step through heartbeat, there won’t be any heartbeat_handler calls triggered from within the vm…</div><div><br></div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<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">BTW what does with ticker and without ticker mean in respect to the heartbeat?</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></div></div></blockquote>I already did that yesterday. Alas it’s only working with superuser rights, otherwise I’ll get &quot;pthread_setschedparam failed; consider using ITIMER_HEARTBEAT: Not owner“.</div>
</div></div></blockquote><div><br></div><div>Ah, ok.  That was the situation on linux before the 2.6.16 kernel (IIRC).  I guess you&#39;re stuck with the getitimer heartbeat.  So the issue is how to rearm the signal handler.  If necessary put a call to signal/sigaction in heartbeat_handler.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>I will also investigate further here so maybe I will get this working.</div>
<div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>HTH,</div><div>Eliot</div><div><br></div></div>
</div></div>
</blockquote></div><br></div><div>Regards,</div><div>Andreas</div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>