On Tue, Jan 18, 2011 at 4:43 AM, Arun R Bharadwaj <a...@linux.vnet.ibm.com> wrote: > * Stefan Hajnoczi <stefa...@gmail.com> [2011-01-17 09:56:58]: > >> On Thu, Jan 13, 2011 at 12:14 PM, Arun R Bharadwaj >> <a...@linux.vnet.ibm.com> wrote: >> > +static void threadlet_io_completion_signal_handler(int signum) >> > +{ >> > + qemu_service_io(); >> > +} >> > + >> > +static void threadlet_register_signal_handler(void) >> > +{ >> > + struct sigaction act; >> > + sigfillset(&act.sa_mask); >> > + act.sa_flags = 0; /* do not restart syscalls to interrupt select() */ >> > + act.sa_handler = threadlet_io_completion_signal_handler; >> > + sigaction(SIGUSR2, &act, NULL); >> > +} >> > + >> > +void threadlet_init(void) >> > +{ >> > + threadlet_register_signal_handler(); >> > +} >> >> This would be the right place to create qemu-threadlet.c, instead of >> adding the thread_init() prototype to qemu-thread.h and then including >> that in vl.c. >> >> Stefan > > I did not follow your comment here. How can we avoid including > threadler_init() in vl.c?
Instead of adding threadlet_init() and related functions to posix-aio-compat.c and adding the prototype to qemu-thread.h, why not just create qemu-threadlet.c/qemu-threadlet.h and put these functions there instead? Stefan