From patchwork Fri Apr 15 11:31:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8850341 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 085FC9F54F for ; Fri, 15 Apr 2016 11:32:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59548201C7 for ; Fri, 15 Apr 2016 11:32:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45336202EB for ; Fri, 15 Apr 2016 11:32:34 +0000 (UTC) Received: from localhost ([::1]:60467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar1zF-0005nJ-Lq for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Apr 2016 07:32:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar1z1-0005io-QG for qemu-devel@nongnu.org; Fri, 15 Apr 2016 07:32:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar1yz-0008Np-Jp for qemu-devel@nongnu.org; Fri, 15 Apr 2016 07:32:19 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar1yz-0008Nd-D2 for qemu-devel@nongnu.org; Fri, 15 Apr 2016 07:32:17 -0400 Received: by mail-wm0-x243.google.com with SMTP id l6so5401667wml.3 for ; Fri, 15 Apr 2016 04:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=s5vf2yQGTNEyXZ8RnCqcfW/iQABBCKJw6QMsusNJM5A=; b=K+vbo3An2HeaV6ywSLnxVd9u8tYEEHOwsaMe4cjo8hCtRDwQzR44hxr6wUPm/1DUs6 sp21jljAay5u1iloWBYVzPC29ZrtLLNdSgQPFejRr/57KM7CM70T3JDCXAklP79364JM 0SWNLOX2hHG+POQcnwf0Jio3dgAf9W+4aYdWSZs0TC2or6a0MjO7xwUb3dKJ9guAvMl0 ji33KUrWtPphJi71Dk89L/uzJS376EBti+oWV5hqlF6IkAnnXuUb7WccIiVELmRn8zRz i95MBM+ORYskqIpGrvFF5e1IUzo//B75IDIzSsEwkBGtqLmHHDnJv1pPRLYusvsgeIty xIDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=s5vf2yQGTNEyXZ8RnCqcfW/iQABBCKJw6QMsusNJM5A=; b=JOSv/2fLL/+qxqypUR/ZLUhZSB6wARY7I6gQI0B/nWBOHvIwbn6e6KygpTkBlbt8AL aeeBlIiRL1cPookPt4BIYG7DGrxQNYj/tUpASiXOfVZADvN+ZBlIXAABDTYbi8lpX61B xzr7TrP2WzTSWyzOXSIIw5R5lYQIKTv+Kx9v8hku6d+PzZzdIrTs39ckVlRu5DezgXOE 2ffTHAMzoFAJEAMtSrJsePxvnbw+A2TGZJFcEAVYFYj6fzwtTT9hxDlTIKTinRiTmdEu 9v4ROUxiRYmDuureXjmT5EtoxuGaenz9P89FCiiMBRTBRd37DAQFbH58/AURDBoVO3v4 OrBw== X-Gm-Message-State: AOPr4FVtuDF9UI/twcckDjU9kCnPa5BipWU8E3dvRyfp5k2PURsBTzbkkJHp0B8stfa9sA== X-Received: by 10.28.68.70 with SMTP id r67mr4053856wma.80.1460719936864; Fri, 15 Apr 2016 04:32:16 -0700 (PDT) Received: from donizetti.redhat.com (94-39-141-76.adsl-ull.clienti.tiscali.it. [94.39.141.76]) by smtp.gmail.com with ESMTPSA id qt3sm15217493wjc.32.2016.04.15.04.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Apr 2016 04:32:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 15 Apr 2016 13:31:58 +0200 Message-Id: <1460719926-12950-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460719926-12950-1-git-send-email-pbonzini@redhat.com> References: <1460719926-12950-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH 03/11] coroutine: delete qemu_co_enter_next X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, berto@igalia.com, famz@redhat.com, stefanha@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- include/qemu/coroutine.h | 5 ----- util/qemu-coroutine-lock.c | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index 63ae7fe..bb23be0 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -130,11 +130,6 @@ bool coroutine_fn qemu_co_queue_next(CoQueue *queue); void coroutine_fn qemu_co_queue_restart_all(CoQueue *queue); /** - * Enter the next coroutine in the queue - */ -bool qemu_co_enter_next(CoQueue *queue); - -/** * Checks if the CoQueue is empty. */ bool qemu_co_queue_empty(CoQueue *queue); diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c index cf53693..1f46970 100644 --- a/util/qemu-coroutine-lock.c +++ b/util/qemu-coroutine-lock.c @@ -93,20 +93,6 @@ void coroutine_fn qemu_co_queue_restart_all(CoQueue *queue) qemu_co_queue_do_restart(queue, false); } -bool qemu_co_enter_next(CoQueue *queue) -{ - Coroutine *next; - - next = QSIMPLEQ_FIRST(&queue->entries); - if (!next) { - return false; - } - - QSIMPLEQ_REMOVE_HEAD(&queue->entries, co_queue_next); - qemu_coroutine_enter(next, NULL); - return true; -} - bool qemu_co_queue_empty(CoQueue *queue) { return QSIMPLEQ_FIRST(&queue->entries) == NULL;