Hi Javier,<br><br><div class="gmail_quote">On Fri, Sep 9, 2011 at 5:49 AM, Javier Pimás <span dir="ltr">&lt;<a href="mailto:elpochodelagente@gmail.com">elpochodelagente@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 <br>Hello guys, we&#39;ve been working in porting the stack vm to native client, and we found that signals are not (yet?) supported. Because of that it&#39;s not possible to compile the sqheartbeat.c file. Is there any way to avoid having to compile it? Because the old interpreter could live without it...</blockquote>
<div><br></div><div>Well, yes its possible if you&#39;re prepared to modify the activation code to check for an event counter, but you really, really don&#39;t want to do that.  Preferrably you need to find an alternative.  One way is by a timer callback, and another way is via a thread looping on a delay.  Which you choose depends on the platform.  On linux we use a timer callback implemented using setitimer and signal, but only because linux doesn&#39;t current;y support multiple thread priorities in user processes.  On Mac and Windows we use a high-priority thread looping on a delay, by far the more preferrable method.  The real question to ask is &quot;What are the timing and threading facilities provided by NaCl?&quot;.  So what does it provide in terms of timer callbacks, delays and multiple threads?  If the answer to all of these is &quot;nothing&quot; then you&#39;ll be forced to go with an event counter, with its attendant performance and latency problems.  ALternatively, if NaCl does provide either delays and multiple threads or timer callbacks, then implement the heartbeat in terms of those facilities.</div>
<div><br></div><div>HTH,</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>

<br></div><div>Cheers,</div><div>Javier.<br clear="all"><div><br></div>-- <br>Lic. Javier Pimás<br>Ciudad de Buenos Aires<br>
</div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>