<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 3:14 PM, Jakub Zalewski <span dir="ltr"><<a href="mailto:jakzale@gmail.com" target="_blank">jakzale@gmail.com</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"><div dir="ltr">Dear all,<div><br></div><div>I am working on porting GHC to [native client](<a href="https://developer.chrome.com/native-client" target="_blank">https://developer.chrome.com/native-client</a>) and I am currently trying to figure out how to port the RTS.</div><div><br></div><div>On POSIX systems RTS seems to depend on two POSIX signals: timer signal and interrupt signal; while native client has very limited POSIX signal support --- for instance it does not define *siginfo_t* (which is referenced in the base package).</div><div><br></div><div>So far, I know how to deal with the dependency on the timer signal, as while browsing the source code in rts/posix/Itimer.c, I noticed that on iOS the timer is not using POSIX signals to implement the timer signal.</div><div><br></div><div>I wanted to ask if there are any other POSIX signal dependencies in the RTS, and would it safe to disable any signal handling in the RTS if I know that there will be no interrupt signals sent to the RTS?</div></div></blockquote><div><br></div><div>I don't know the answer to your question, but for an additional data point  you might look at the HalVM: <a href="https://github.com/galoisinc/halvm">https://github.com/galoisinc/halvm</a></div><div><br></div><div>For the specific case of timers it may not be helpful (for all I know it uses some xen magic to get a timer interrupt), but it should be similar to native-client support in that the HalVM provides the RTS with a stripped down libc.</div><div><br></div><div>Jason</div></div></div></div>