On Nov 13, 2007 11:42 PM, Dor Laor <dor.laor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Anthony Liguori wrote:
I've been experimenting with creating IO threads for the PV device
drivers. Unfortunately, my experiments haven't gotten very far as QEMU
tends to hang up a bit into booting the guest whenever I spawn a thread
that does any sort of read/write on a file descriptor. My suspicion is
that it has something to do with signals being delivered to the wrong
thread but after masking out all the signals for this thread, I still
had no luck.
Maybe you set the mask too late? try setting it before creating the thread:
sigfillset(&thread_sig_mask);
sigdelset(&thread_sig_mask,SIGILL);
sigdelset(&thread_sig_mask,SIGFPE);
sigdelset(&thread_sig_mask,SIGSEGV);
When using RTC or HPET for timing you also need to mask SIGIO; you may
also need to change F_SETOWN (enable_sigio_timer) with the correct
thread id, i.e.:
fcntl(fd, F_SETOWN, gettid());
Luca
I do mask SIGIO - first the set is fiilled, then SGILL,SIGFPE,SIGSEGV
are back enabled.