Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpLZC-00055u-Rj for qemu-devel@nongnu.org; Wed, 10 Mar 2010 08:03:14 -0500 Received: from [199.232.76.173] (port=47855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpLZC-00055m-Ey for qemu-devel@nongnu.org; Wed, 10 Mar 2010 08:03:14 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpLZB-00027x-0q for qemu-devel@nongnu.org; Wed, 10 Mar 2010 08:03:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45956) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpLZA-00027Y-J7 for qemu-devel@nongnu.org; Wed, 10 Mar 2010 08:03:12 -0500 From: Juan Quintela In-Reply-To: (malc's message of "Wed, 10 Mar 2010 15:54:41 +0300 (MSK)") References: <4f197c437a4d2f813ce518b4fd2d86fc225f500e.1268214633.git.quintela@redhat.com> Date: Wed, 10 Mar 2010 14:03:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 01/14] Convert io handlers to QLIST List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org malc wrote: > On Wed, 10 Mar 2010, Juan Quintela wrote: > >> malc wrote: >> > On Wed, 10 Mar 2010, Juan Quintela wrote: >> > >> >> malc 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.