[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [Qemu-devel] [PATCH 01/13] Handle terminating signals.



Jamie Lokier wrote:
Leading to: why would (real) signals being used to collect AIO events
anyway, if you don't have signalfd()?  If you've got a helper thread,
just call aio_suspend() in the helper thread.

There is no helper thread when signalfd() is available. The helper thread thing is only for backwards compatibility or for unices that don't support signalfd. Plus, there are a lot of places that we use signals currently.

  Then you can just
deliver the AIO completion result to the relevant data structure or
even move it off the waiting queue (pthread_mutex_lock is your
friend), then wake the main waiting thread with byte written to its
pipe.

It's the queuing with threads where things start getting complicated and error prone.

Regards,

Anthony Liguori

-- Jamie




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.