qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadl


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API
Date: Tue, 18 Jan 2011 06:31:34 +0000

On Tue, Jan 18, 2011 at 4:43 AM, Arun R Bharadwaj
<address@hidden> wrote:
> * Stefan Hajnoczi <address@hidden> [2011-01-17 09:56:58]:
>
>> On Thu, Jan 13, 2011 at 12:14 PM, Arun R Bharadwaj
>> <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]