From patchwork Thu Dec 1 04:30:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaowei Bai X-Patchwork-Id: 701316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tTh7D4hvPz9t1H for ; Thu, 1 Dec 2016 13:29:12 +1100 (AEDT) Received: from localhost ([::1]:47626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCH7S-0004lu-DJ for incoming@patchwork.ozlabs.org; Wed, 30 Nov 2016 21:29:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCH6T-0003wL-EB for qemu-devel@nongnu.org; Wed, 30 Nov 2016 21:28:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCH6S-0007J0-Ke for qemu-devel@nongnu.org; Wed, 30 Nov 2016 21:28:05 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:31210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCH6M-0007Fy-V1; Wed, 30 Nov 2016 21:27:59 -0500 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee6583f8aa73b9-7c69c; Thu, 01 Dec 2016 10:27:51 +0800 (CST) X-RM-TRANSID: 2ee6583f8aa73b9-7c69c X-RM-SPAM-FLAG: 00000000 Received: from baiyaowei.openstacklocal (unknown[223.105.0.242]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee3583f8a9ec79-17604; Thu, 01 Dec 2016 10:27:51 +0800 (CST) X-RM-TRANSID: 2ee3583f8a9ec79-17604 From: Yaowei Bai To: stefanha@redhat.com, famz@redhat.com, kwolf@redhat.com, mreitz@redhat.com, pbonzini@redhat.com Date: Wed, 30 Nov 2016 23:30:39 -0500 Message-Id: <1480566640-27264-2-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1480566640-27264-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1480566640-27264-1-git-send-email-baiyaowei@cmss.chinamobile.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 221.176.66.80 Subject: [Qemu-devel] [PATCH 2/3] main-loop: update comment for qemu_mutex_lock/unlock_iothread 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: baiyaowei@cmss.chinamobile.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 49cf57281b7 (vl: delay thread initialization after daemonization) makes the global mutex is taken after daemonization instead before daemonization by qemu_init_main_loop(). Signed-off-by: Yaowei Bai --- include/qemu/main-loop.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 470f600..a9d4f23 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -238,7 +238,7 @@ bool qemu_mutex_iothread_locked(void); * qemu_mutex_lock_iothread: Lock the main loop mutex. * * This function locks the main loop mutex. The mutex is taken by - * qemu_init_main_loop and always taken except while waiting on + * main() in vl.c and always taken except while waiting on * external events (such as with select). The mutex should be taken * by threads other than the main loop thread when calling * qemu_bh_new(), qemu_set_fd_handler() and basically all other @@ -253,7 +253,7 @@ void qemu_mutex_lock_iothread(void); * qemu_mutex_unlock_iothread: Unlock the main loop mutex. * * This function unlocks the main loop mutex. The mutex is taken by - * qemu_init_main_loop and always taken except while waiting on + * main() in vl.c and always taken except while waiting on * external events (such as with select). The mutex should be unlocked * as soon as possible by threads other than the main loop thread, * because it prevents the main loop from processing callbacks,