[Top][All Lists]
[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: |
Wed, 19 Jan 2011 07:54:34 +0000 |
On Tue, Jan 18, 2011 at 6:10 PM, Venkateswararao Jujjuri (JV)
<address@hidden> wrote:
> On 1/17/2011 11:14 PM, Stefan Hajnoczi wrote:
>> On Tue, Jan 18, 2011 at 6:46 AM, Arun R Bharadwaj
>> <address@hidden> wrote:
>>> * Stefan Hajnoczi <address@hidden> [2011-01-18 06:31:34]:
>>>
>>>> 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
>>>
>>> Got it. So you mean I merge patch 8 and patch 10 into a single patch.
>>> But wouldn't this mean we are moving code and adding new API in the
>>> same patch? Anthony did not want this from what I recall. But I can do
>>> it if you feel it makes things simple.
>>
>> I don't think you need to merge the patches. It's odd to add
>> functions to posix-aio-compat.c but put the prototype in qemu-thread.h
>> (and then include and call from vl.c). So for these three functions
>> (threadlet_init, threadlet_register_signal_handler, and
>> threadlet_io_completion_signal_handler) only I think it makes sense to
>> move them to qemu-threadlet.[ch] straight away.
>
> So basically create the new file qemu-threadlet.[ch] with only these functions
> and move the rest of the code in patch 10(as we do now).
Exactly.
Stefan
- [Qemu-devel] [PATCH 07/12] Remove thread_create routine., (continued)
- [Qemu-devel] [PATCH 07/12] Remove thread_create routine., Arun R Bharadwaj, 2011/01/13
- [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Arun R Bharadwaj, 2011/01/13
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Stefan Hajnoczi, 2011/01/17
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Arun R Bharadwaj, 2011/01/17
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Stefan Hajnoczi, 2011/01/18
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Arun R Bharadwaj, 2011/01/18
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Stefan Hajnoczi, 2011/01/18
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API, Venkateswararao Jujjuri (JV), 2011/01/18
- Re: [Qemu-devel] [PATCH 08/12] Threadlet: Add aio_signal_handler threadlet API,
Stefan Hajnoczi <=
[Qemu-devel] [PATCH 09/12] Remove all instances of CONFIG_THREAD, Arun R Bharadwaj, 2011/01/13
[Qemu-devel] [PATCH 10/12] Move threadlet code to qemu-threadlets.c, Arun R Bharadwaj, 2011/01/13
[Qemu-devel] [PATCH 11/12] Threadlets: Add functionality to create private queues., Arun R Bharadwaj, 2011/01/13
[Qemu-devel] [PATCH 12/12] Threadlets: Add documentation, Arun R Bharadwaj, 2011/01/13
Re: [Qemu-devel] [PATCH 00/12] Threadlets Infrastructure., Stefan Hajnoczi, 2011/01/17