From patchwork Tue Mar 16 18:51:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 47894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6D85CB7C98 for ; Wed, 17 Mar 2010 06:03:30 +1100 (EST) Received: from localhost ([127.0.0.1]:56382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nrc35-0006gk-Nw for incoming@patchwork.ozlabs.org; Tue, 16 Mar 2010 15:03:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nrbrj-0002LO-4A for qemu-devel@nongnu.org; Tue, 16 Mar 2010 14:51:43 -0400 Received: from [199.232.76.173] (port=42502 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nrbrh-0002Jc-Mu for qemu-devel@nongnu.org; Tue, 16 Mar 2010 14:51:41 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nrbrg-0000Bj-1L for qemu-devel@nongnu.org; Tue, 16 Mar 2010 14:51:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24153) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nrbre-0000B9-U2 for qemu-devel@nongnu.org; Tue, 16 Mar 2010 14:51:39 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2GIpZ98013051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 16 Mar 2010 14:51:36 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2GIpPvE023231; Tue, 16 Mar 2010 14:51:35 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 16 Mar 2010 19:51:23 +0100 Message-Id: <233a28493393ba2abfd43592281523ec06d43cfd.1268765204.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 7/9] QLIST: Introduce QLIST_COPY_HEAD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This operation copies one head into other. Signed-off-by: Juan Quintela --- qemu-queue.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-queue.h b/qemu-queue.h index 1d07745..bf5cfdc 100644 --- a/qemu-queue.h +++ b/qemu-queue.h @@ -100,6 +100,10 @@ struct { \ (head)->lh_first = NULL; \ } while (/*CONSTCOND*/0) +#define QLIST_COPY_HEAD(head, origin) do { \ + (head)->lh_first = (origin)->lh_first; \ +} while (/*CONSTCOND*/0) + #define QLIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \