From nobody Mon Feb 9 12:24:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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=1586527022; cv=none; d=zohomail.com; s=zohoarc; b=Nd24cbzovkwlD/Z8w9yUDokAh1TSDXx1mlRFv+D1piV8lFh2KyIpwweT5ece1dGIHPmFl2WRMzOqL0gd9qm8HTBLpWoD7WsYU1Ro607uAvP4L9YCkYRrmoAs8o//7UnUfMemrd2AM39A53/Qu1QtrtRe5V7KsvCyBrWnCB49SUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586527022; 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=UPQKItS1ytxTIY2LKXrZpSlruMF0fmSo7mjBJpfL6cw=; b=lNPY265jIWrNaGadetJpRW1H7dxATzppIKJaxaXqSCbf4K5R2IOCTO6YGkSgNG4VTzvbrWWGS8/X+t01dhvazt29R4XvbQMoEfHIs/CMS/9ho1yn59rIbyri7+FFhSN7oFq4dBMWuMJdCZHavIyLupLGaGQ+zd678nWOw33d0sk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1586527022626660.0342765355172; Fri, 10 Apr 2020 06:57:02 -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-386-ubdNZ9dwPaq4RycRf2l87g-1; Fri, 10 Apr 2020 09:56:59 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A099018B5F6B; Fri, 10 Apr 2020 13:56:52 +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 7BBC69E0C6; Fri, 10 Apr 2020 13:56:52 +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 3425193F4F; Fri, 10 Apr 2020 13:56:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03ADuPBq023394 for ; Fri, 10 Apr 2020 09:56:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id A15052166B35; Fri, 10 Apr 2020 13:56:25 +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 9D0AD2166B34 for ; Fri, 10 Apr 2020 13:56:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.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 83A8E101A55D for ; Fri, 10 Apr 2020 13:56:25 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-K9_CD5ypO9KSLgPIbkHZEA-1; Fri, 10 Apr 2020 09:56:23 -0400 Received: by mail-wr1-f45.google.com with SMTP id h9so2372231wrc.8 for ; Fri, 10 Apr 2020 06:56:22 -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.56.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 06:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586527021; 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=UPQKItS1ytxTIY2LKXrZpSlruMF0fmSo7mjBJpfL6cw=; b=FAOKwunw/yqa4Dp81wHeNnMnS1yzKglefW0zq+hRZx8qcaOLLqA65sI5+ErN0SagjVQHDF Fdsv/7/cYSRDvO9loOCblkg+B7PmYcqYORxG2qQY4YMvYnDXG9k21NgWL0ue9LvjN5VouY gZLwLt0+p//LC95yBjjHSwxdlkGFXUQ= X-MC-Unique: ubdNZ9dwPaq4RycRf2l87g-1 X-MC-Unique: K9_CD5ypO9KSLgPIbkHZEA-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=G3zh9w6xmXN8o1I44yFxGevWj7JqA3yqCAasdVtD2Ng=; b=VenbdWRvUN/GFQTffVxuXtknMwZjf3uFTP9CwmbG9gQePbubXD2M9vulrdSyqUG0Vw za2aGyzB4BFQbiSdAKlv7ybSj+wf2BBcsMvoZSAacG9yB8Jg5ClhxE1fltSWG2a5F1Yo +hyEtWa0BjkdmGJ3AeMGB69hteX9w6G33mkkUIsgZ8NhS3rCtFCJVZ8DwZmt1s5T59Fx Cf8BJa35PGc8Bf34epdwJK9mhsShXU9zBHARsC5S+g6uR8gX0TfbIJR9aEKE+eLAxPhA +2wgRYbLk+ayGoQxVRd0XPS47wwiLe4WaPgjC0DzEnElrAq2YROwFiwDjRbVh/AOUNqw +Q1Q== X-Gm-Message-State: AGi0Pub9VSGEcTJXb4zmwlbnBsPnkgvDhQ1V8eW99XHligtNYein7f03 OrSecj/KsLSf4NT1p9HOeBRHAMnHWrw= X-Google-Smtp-Source: APiQypLc0F5ml8+R7Z80BLR5wWkmQzY40Gb2SgBmtd5687C8aa+3rAg5sbN3YJgVooRuqCoAbHndWw== X-Received: by 2002:adf:e282:: with SMTP id v2mr4691891wri.329.1586526981602; Fri, 10 Apr 2020 06:56:21 -0700 (PDT) From: Rafael Fonseca To: libvir-list@redhat.com Subject: [PATCH 41/43] util: virthread: remove virRWLock Date: Fri, 10 Apr 2020 15:55:08 +0200 Message-Id: <20200410135510.2148319-42-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.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 03ADuPBq023394 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.13 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" All instances where virRWLock where used were replaced by GRWLock. Signed-off-by: Rafael Fonseca --- src/libvirt_private.syms | 5 ----- src/util/virthread.c | 33 --------------------------------- src/util/virthread.h | 16 ---------------- 3 files changed, 54 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c2abbf65c2..4dfafdfd3e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3271,11 +3271,6 @@ virMutexInitRecursive; virMutexLock; virMutexUnlock; virOnce; -virRWLockDestroy; -virRWLockInit; -virRWLockRead; -virRWLockUnlock; -virRWLockWrite; virThreadCancel; virThreadCreateFull; virThreadID; diff --git a/src/util/virthread.c b/src/util/virthread.c index 64013b575c..1ec5096ced 100644 --- a/src/util/virthread.c +++ b/src/util/virthread.c @@ -89,39 +89,6 @@ void virMutexUnlock(virMutexPtr m) } =20 =20 -int virRWLockInit(virRWLockPtr m) -{ - int ret; - ret =3D pthread_rwlock_init(&m->lock, NULL); - if (ret !=3D 0) { - errno =3D ret; - return -1; - } - return 0; -} - -void virRWLockDestroy(virRWLockPtr m) -{ - pthread_rwlock_destroy(&m->lock); -} - - -void virRWLockRead(virRWLockPtr m) -{ - pthread_rwlock_rdlock(&m->lock); -} - -void virRWLockWrite(virRWLockPtr m) -{ - pthread_rwlock_wrlock(&m->lock); -} - - -void virRWLockUnlock(virRWLockPtr m) -{ - pthread_rwlock_unlock(&m->lock); -} - int virCondInit(virCondPtr c) { int ret; diff --git a/src/util/virthread.h b/src/util/virthread.h index c227951ddd..a57c99bdf0 100644 --- a/src/util/virthread.h +++ b/src/util/virthread.h @@ -33,14 +33,6 @@ struct virMutex { pthread_mutex_t lock; }; =20 -typedef struct virRWLock virRWLock; -typedef virRWLock *virRWLockPtr; - -struct virRWLock { - pthread_rwlock_t lock; -}; - - typedef struct virCond virCond; typedef virCond *virCondPtr; =20 @@ -133,14 +125,6 @@ void virMutexLock(virMutexPtr m); void virMutexUnlock(virMutexPtr m); =20 =20 -int virRWLockInit(virRWLockPtr m) G_GNUC_WARN_UNUSED_RESULT; -void virRWLockDestroy(virRWLockPtr m); - -void virRWLockRead(virRWLockPtr m); -void virRWLockWrite(virRWLockPtr m); -void virRWLockUnlock(virRWLockPtr m); - - int virCondInit(virCondPtr c) G_GNUC_WARN_UNUSED_RESULT; int virCondDestroy(virCondPtr c); =20 --=20 2.25.2