From patchwork Wed Dec 2 12:04:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 40043 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 34E07B7BF2 for ; Thu, 3 Dec 2009 01:25:23 +1100 (EST) Received: from localhost ([127.0.0.1]:44358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFq8t-0004xz-Ny for incoming@patchwork.ozlabs.org; Wed, 02 Dec 2009 09:25:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFnyM-0004fQ-2y for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFnyH-0004c6-7i for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:17 -0500 Received: from [199.232.76.173] (port=42951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFnyG-0004bq-R9 for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17392) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFnyG-0004G1-Cg for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:12 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB2C6BME019049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 2 Dec 2009 07:06:11 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB2C5ILZ029769; Wed, 2 Dec 2009 07:06:10 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 2 Dec 2009 13:04:35 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 37/41] 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 8877efd..a59f948 100644 --- a/qemu-queue.h +++ b/qemu-queue.h @@ -92,6 +92,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 = \