Remove rwlock wrappers

The only remaining consumer of the rwlock compatibility wrappers
is ztest.  Remove the wrappers and convert the few remaining
calls to the underlying pthread functions.

    rwlock_init()    -> pthread_rwlock_init()
    rwlock_destroy() -> pthread_rwlock_destroy()
    rw_rdlock()      -> pthread_rwlock_rdlock()
    rw_wrlock()      -> pthread_rwlock_wrlock()
    rw_unlock()      -> pthread_rwlock_unlock()

Note pthread_rwlock_init() defaults to PTHREAD_PROCESS_PRIVATE
which is equivilant to the USYNC_THREAD behavior.  There is no
functional change.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7591
This commit is contained in:
Brian Behlendorf
2018-06-04 16:52:10 -07:00
committed by GitHub
parent e48afbc4eb
commit 2d9142c9d4
4 changed files with 54 additions and 137 deletions
-1
View File
@@ -86,7 +86,6 @@
#include <strings.h>
#include <pthread.h>
#include <setjmp.h>
#include <synch.h>
#include <assert.h>
#include <alloca.h>
#include <umem.h>