From patchwork Tue Jun 23 14:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11620893 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33D10913 for ; Tue, 23 Jun 2020 14:58:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0971720723 for ; Tue, 23 Jun 2020 14:58:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="PmXbJZl9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0971720723 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnkNo-00017p-3N for patchwork-qemu-devel@patchwork.kernel.org; Tue, 23 Jun 2020 10:58:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnk8i-00047O-SV; Tue, 23 Jun 2020 10:43:08 -0400 Received: from mout.web.de ([212.227.17.11]:42367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnk8g-0002Ys-Ss; Tue, 23 Jun 2020 10:43:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1592923380; bh=3cHbGcz3lZmcKJXuzmvXzd3SToaDH2ofaQrw3xL/jKU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=PmXbJZl9h+nIAZN0Y5bfufaoTYV/qWlRlR9gGsSiBEyRQgIOPDHKBPaxKVdxfXolQ 7MN7E+tc3iwwXUCMvXONWD6XCwODScs0jlnTe9TIpM5Fg+Km8gHQvZOeQEhjKq/l6A WGIQ1z0/RoPy1iy7FI+xccu7nB+toQ4PDrPeg2Rc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([88.130.61.8]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MINAx-1jqm8x2ONj-0048Fa; Tue, 23 Jun 2020 16:43:00 +0200 Date: Tue, 23 Jun 2020 16:42:59 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH v5 6/7] io: Document thread-safety of qio_channel_shutdown Message-ID: <8d567c499f0d778501d57007b90ec3450aba9947.1592923201.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:UYMpYLGEX++84fzRIrzOsAtFaWAxdWVv5LLvfKJOhQ0OpegHXTq k37T+6cWZMmSMrz7V1HGWaU4b7rX4NF0msUKrMOElHadbyUWI29Lk0yQeUbEr3qvpKzu8D7 uSXQe6XuV8W+yxxWfRwDVFbhI+kSWWxT9crSYOlOTBNfuByg5/lP7o4rLTr2Rde/MM2DoJk ZV0iczqJpAOk4Z0XnpJLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:+ou0dN+nVwQ=:wuW8Q8N65P+uZ1K9aqscRw 4ywdEfK3IKhVWoONkia1qcE+KhkdTzTke+q3Rh0465tv9HI/lELug/BsT5fRlIGbecpCW20ES EIuKdtkAk9UWHqUs6wHRFKMS5k91kYi629dn5FudjLt8HqOhu8n6YVSDDR5glQfGtVPJg/gwo gxjmWH7FIiP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KdoVhXEx YIWxwnoRsFOxLsc7v Received-SPF: pass client-ip=212.227.17.11; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/23 10:42:51 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Migration and yank code assume that qio_channel_shutdown is thread -safe. Document this after checking the code. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/include/io/channel.h b/include/io/channel.h index d4557f0930..6b8a2b87b8 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -516,6 +516,8 @@ int qio_channel_close(QIOChannel *ioc, * QIO_CHANNEL_FEATURE_SHUTDOWN prior to calling * this method. * + * This function is thread-safe. + * * Returns: 0 on success, -1 on error */ int qio_channel_shutdown(QIOChannel *ioc,