qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST
Date: Wed, 10 Mar 2010 14:03:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

malc <address@hidden> wrote:
> On Wed, 10 Mar 2010, Juan Quintela wrote:
>
>> malc <address@hidden> wrote:
>> > On Wed, 10 Mar 2010, Juan Quintela wrote:
>> >
>> >> malc <address@hidden> wrote:
>> >> > On Wed, 10 Mar 2010, Juan Quintela wrote:
>> >> 
>> >> >> -        for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
>> >> >> +        QTAILQ_FOREACH(ioh, &io_handlers, next) {
>> >> >>              if (ioh->fd == fd)
>> >> >>                  goto found;
>> >> >>          }
>> >> >>          ioh = qemu_mallocz(sizeof(IOHandlerRecord));
>> >> >> -        ioh->next = first_io_handler;
>> >> >> -        first_io_handler = ioh;
>> >> >> +        QTAILQ_INSERT_TAIL(&io_handlers, ioh, next);
>> >> >
>> >> > The old code inserted at the head, didn't it?
>> >> 
>> >> Sorry, you are right, it shouldn't matter too much, but it is a change.
>> >
>> > If it did, why queue instead of list?
>> 
>> Arbitrary.  Example conversion nearer was QTAIL.
>
> Please do `man 3 queue'. Specifically the comparison between the tail
> queues and lists.

Thanks very much for the info.  Didn't knew that page.

You win.  Will change to QLISTS.  Waiting for more comments.

Later, Juan.




reply via email to

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