From nobody Mon Feb 9 01:20:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1586526980; cv=none; d=zohomail.com; s=zohoarc; b=H0T0p4aGepILJ761j8Q1j5XpK2/ztVJGskoT378tNzdrBnGP6iDSs3GrtbB3uWCGaiZhivUfAhSimOV66zChfnRcLjyRn70Zi6N1XmHuF/Ocdnjen5Fto6d5t7Ua+um1aEaop61vCz3j4eWVGkS9sc8StvRA9sJGRnxMGgg/GjU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586526980; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vzcSI17PExR9vM1AbkyKflBFIg/dCcBHifFIzugsJmQ=; b=DCFHX4nGPGPFFYIHN81Q+OGPdeslnN5zuq9lsP4dNW5fUcsQOE5sqQyiyO8USerBXVEAAkUg1KJKZ8ETtG8ZItOyj0cQM1ti4Jbc1jZy6SzLLs20krfCzW25xX+KjYXuTCW+6wub66jnmj1dExcmkrX8EMFbKgr6FXUm5unJVoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1586526980240891.5499211948813; Fri, 10 Apr 2020 06:56:20 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-_9DX52NfNYKus8GIvqAkgw-1; Fri, 10 Apr 2020 09:56:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0215A18B5F77; Fri, 10 Apr 2020 13:56:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD60D5C557; Fri, 10 Apr 2020 13:56:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6FDD393091; Fri, 10 Apr 2020 13:56:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03ADtgsM022960 for ; Fri, 10 Apr 2020 09:55:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id C6345127512; Fri, 10 Apr 2020 13:55:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C29A6127510 for ; Fri, 10 Apr 2020 13:55:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9D63101A55D for ; Fri, 10 Apr 2020 13:55:42 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-xXLOYRdMNGKbtmPsDynKtQ-1; Fri, 10 Apr 2020 09:55:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id r26so2831911wmh.0 for ; Fri, 10 Apr 2020 06:55:40 -0700 (PDT) Received: from localhost.localdomain (public-gprs377075.centertel.pl. [37.47.104.52]) by smtp.gmail.com with ESMTPSA id c11sm3066319wrt.24.2020.04.10.06.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 06:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586526978; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vzcSI17PExR9vM1AbkyKflBFIg/dCcBHifFIzugsJmQ=; b=eAbaS55zi4pka+UQ3/WtnDmTrLnVRbL0rXmN95btuLknfXLlGj8azg0wXM+Unf67VtUfVl xv8+7OJx2bVkBQXuIjLJKwMlSxikbIf4NR9kbt31xk9PBYxuwLaksJ56mrRFhaoLe5I8nt rG6P0CHUdYtMMF32RPvsLx5XU8oTOTM= X-MC-Unique: _9DX52NfNYKus8GIvqAkgw-1 X-MC-Unique: xXLOYRdMNGKbtmPsDynKtQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nk8/24cAGItny9zidgFFVKFLJZ7FO/T2WLY89VrRZ7s=; b=NYNqFCJEzHxONbqlJBIw0OpVsmEM10SQRDLbQ4ob4s0bJSbOUiTCiz8ETTwhwYQb3y hkQpkL4Qp55WGid/r6FLWOI5XvTfkuETKc60+hvV3Cjn/BmoD2YSGzN3pSQhv3ryMD9x FJT9qMUUZfH10ttkICgreMlSglcigGVBaQ2Dp6UTaQCe/eIZcKdercIxEsJtuuudOM1M ldsK71V92BqZo+44iqw+R/Q3wlwLOCBQc/3w4oRKP74MSYt4BYF+54Vyh5k9to5uvZFg jjvwnDtIHP3f4je/CzvwgpSDx69dDIYvyddDWPLVusgtBxuuwMYz6XkVy7zth3myj1by melg== X-Gm-Message-State: AGi0PuaUnvxNmhhp0nZq+CCruojG7OTeZKjt3UQsDQcacpCIh5qexTl4 He5jUN9Ik4tsQZNQOzmIHvO967p4rDk= X-Google-Smtp-Source: APiQypI1m6jGoKYYxsdcDjY7DiBolUCf9no8/0hqwJcANNg7eiTgge9x73x3jCswle9Wl+KG7ggwvg== X-Received: by 2002:a1c:6545:: with SMTP id z66mr5112264wmb.81.1586526938816; Fri, 10 Apr 2020 06:55:38 -0700 (PDT) From: Rafael Fonseca To: libvir-list@redhat.com Subject: [PATCH 08/43] util: virnodesuspend: convert virMutex to GMutex Date: Fri, 10 Apr 2020 15:54:35 +0200 Message-Id: <20200410135510.2148319-9-r4f4rfs@gmail.com> In-Reply-To: <20200410135510.2148319-1-r4f4rfs@gmail.com> References: <20200410135510.2148319-1-r4f4rfs@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03ADtgsM022960 X-loop: libvir-list@redhat.com Cc: Rafael Fonseca X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Rafael Fonseca --- src/util/virnodesuspend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index 544a29783c..f336b3aa98 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@ -49,18 +49,18 @@ VIR_LOG_INIT("util.nodesuspend"); static unsigned int nodeSuspendTargetMask; static bool nodeSuspendTargetMaskInit; =20 -static virMutex virNodeSuspendMutex =3D VIR_MUTEX_INITIALIZER; +G_LOCK_DEFINE_STATIC(virNodeSuspendMutex); =20 static bool aboutToSuspend; =20 static void virNodeSuspendLock(void) { - virMutexLock(&virNodeSuspendMutex); + G_LOCK(virNodeSuspendMutex); } =20 static void virNodeSuspendUnlock(void) { - virMutexUnlock(&virNodeSuspendMutex); + G_UNLOCK(virNodeSuspendMutex); } =20 =20 --=20 2.25.2