[PATCH 41/43] util: virthread: remove virRWLock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All instances where virRWLock where used were replaced by GRWLock.

Signed-off-by: Rafael Fonseca <r4f4rfs@xxxxxxxxx>
---
 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)
 }
 
 
-int virRWLockInit(virRWLockPtr m)
-{
-    int ret;
-    ret = pthread_rwlock_init(&m->lock, NULL);
-    if (ret != 0) {
-        errno = 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;
 };
 
-typedef struct virRWLock virRWLock;
-typedef virRWLock *virRWLockPtr;
-
-struct virRWLock {
-    pthread_rwlock_t lock;
-};
-
-
 typedef struct virCond virCond;
 typedef virCond *virCondPtr;
 
@@ -133,14 +125,6 @@ void virMutexLock(virMutexPtr m);
 void virMutexUnlock(virMutexPtr m);
 
 
-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);
 
-- 
2.25.2






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux