From nobody Mon Feb 9 12:09:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1586526974; cv=none; d=zohomail.com; s=zohoarc; b=MyfaCMG/tV1kKbI59wbeM6yeSfz3wFGPoMxGlC65R0XzqnYNoPaUWsjjGhd/z/azf6Kce7ZV/DyeVfxwr2nAXDWjIqxo5VSofYqhbUOU17uae3xnTNBTCwvz7JRDjUjNT4La429aKq+zOZ1fUuqwTh3Xe2WB+lxhMsbm9/F0Hqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586526974; 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=zYy2fmrg0Ycy1awlKU3yZhLJsYj0C0/tIoI0fxD4+hU=; b=KBHDLMxrQPWdA2PW6wlKSTC90IhDW2pq1xGl+tvif6hr5dgVHcnbcWzkrbDHu3CvY91OjMoqC9BKcSncmdHDpmdmODcC+uhCrAGqOwZUbqZwRFVoyDbAUrCeiXfjsMEBYKymgpoKDhAjkNPRVOqcFJf/Sx7SVKnYQf+51y+6lUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1586526974419104.33721899583838; Fri, 10 Apr 2020 06:56:14 -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-12-UCGylcxFP0exh88d1yiwZw-1; Fri, 10 Apr 2020 09:56:10 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 313D618B5F73; Fri, 10 Apr 2020 13:56:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04D465DA66; Fri, 10 Apr 2020 13:56:05 +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 9B98018089D8; Fri, 10 Apr 2020 13:56:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03ADtfsH022946 for ; Fri, 10 Apr 2020 09:55:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id DA481200AD4C; Fri, 10 Apr 2020 13:55:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5FB32024517 for ; Fri, 10 Apr 2020 13:55:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (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 B494F8007A4 for ; Fri, 10 Apr 2020 13:55:41 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-Dg8ZMRC0MvSimIsZphkFUw-1; Fri, 10 Apr 2020 09:55:39 -0400 Received: by mail-wr1-f42.google.com with SMTP id g3so2413174wrx.2 for ; Fri, 10 Apr 2020 06:55:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 06:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586526973; 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=zYy2fmrg0Ycy1awlKU3yZhLJsYj0C0/tIoI0fxD4+hU=; b=HppYqUkeer2qfl7+QiKynjKovEOPrBgl/fPxk7CvOLkBu1Vs+psvOwA59ANhSlVNAEiOzh g5y2vHPwOZo3yllp2wKUE5NSdh+1W+FHUDW6F5qS7p3vwWuyp/SciSeLDmHIzjmzSNfA2g mR5ISNw/7wG8w6QC2zxgFf42VmUDM5A= X-MC-Unique: UCGylcxFP0exh88d1yiwZw-1 X-MC-Unique: Dg8ZMRC0MvSimIsZphkFUw-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=hua2CQnFBXLcn5Yprcd0XEUvB55XUzt2U3ELEn1TQ1Q=; b=C1aj75CANGUrExVKwAZBZFnWFgO2cgRMejqb2gYwgYrDUguVlQJQeTiW3U5d+C2Sol cxfwYHPdfY9O8f8Rtmntecs9RwgENs0EBtyJJ4IZ0fM/Lk7uIbWR719hB08V7Fq0Nwo3 R56ZSI5A6uXWUUtWjkkKA6Dx6O1hmt6O7WgrhX8RIzxIGobgMtY7tYyeqniGZItYHEXQ 81y/MuxFLQJaQ3+gs1WVQFzvIeUk5koeNYV4jEP3gq9Oqk+qK50K3Tb3DTzv11nMJpVj wuebfd72SsuSHsrvDZZACZy2nQU8ACIcZ3U0CkTQ4hJYBkJ2zE4S3PyKqVofqVaND0AV bWLA== X-Gm-Message-State: AGi0PubhKaaz806Voe0FKs/CCDsFivlBg5oHauik/Fbvcn1tnQ3S+kPx gqFoKnrefLnTuYWUlKYKg4iXoGVxEYE= X-Google-Smtp-Source: APiQypLWFT32dh1NlvodzY1p8GR9uurcVKUbjsJdHKnztwv5rm/8csx5VEHxEGTrwMA7qykACFFfcg== X-Received: by 2002:adf:ed86:: with SMTP id c6mr4537353wro.286.1586526937645; Fri, 10 Apr 2020 06:55:37 -0700 (PDT) From: Rafael Fonseca To: libvir-list@redhat.com Subject: [PATCH 07/43] vbox: convert virMutex to GMutex Date: Fri, 10 Apr 2020 15:54:34 +0200 Message-Id: <20200410135510.2148319-8-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.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03ADtfsH022946 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.14 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/vbox/vbox_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index e98ae04ec0..98d6978c51 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -58,7 +58,7 @@ VIR_LOG_INIT("vbox.vbox_common"); static vboxUniformedAPI gVBoxAPI; =20 static virClassPtr vboxDriverClass; -static virMutex vbox_driver_lock =3D VIR_MUTEX_INITIALIZER; +G_LOCK_DEFINE_STATIC(vbox_driver_lock); static vboxDriverPtr vbox_driver; static vboxDriverPtr vboxDriverObjNew(void); =20 @@ -233,7 +233,7 @@ vboxSdkUninitialize(void) static vboxDriverPtr vboxGetDriverConnection(void) { - virMutexLock(&vbox_driver_lock); + G_LOCK(vbox_driver_lock); =20 if (vbox_driver) { virObjectRef(vbox_driver); @@ -253,14 +253,14 @@ vboxGetDriverConnection(void) if (!virObjectUnref(vbox_driver)) vbox_driver =3D NULL; =20 - virMutexUnlock(&vbox_driver_lock); + G_UNLOCK(vbox_driver_lock); =20 return NULL; } =20 vbox_driver->connectionCount++; =20 - virMutexUnlock(&vbox_driver_lock); + G_UNLOCK(vbox_driver_lock); =20 return vbox_driver; } @@ -268,7 +268,7 @@ vboxGetDriverConnection(void) static void vboxDestroyDriverConnection(void) { - virMutexLock(&vbox_driver_lock); + G_LOCK(vbox_driver_lock); =20 if (!vbox_driver) goto cleanup; @@ -281,7 +281,7 @@ vboxDestroyDriverConnection(void) vbox_driver =3D NULL; =20 cleanup: - virMutexUnlock(&vbox_driver_lock); + G_UNLOCK(vbox_driver_lock); } =20 static int openSessionForMachine(vboxDriverPtr data, const unsigned char *= dom_uuid, --=20 2.25.2