Fix heim_threads.h rwlocks macros for pthreads

This commit is contained in:
Nicolas Williams
2016-04-11 23:46:47 -05:00
parent c2fafff992
commit 22934bae7c

View File

@@ -92,8 +92,8 @@
#define HEIMDAL_MUTEX_unlock(m) pthread_mutex_unlock(m)
#define HEIMDAL_MUTEX_destroy(m) pthread_mutex_destroy(m)
#define HEIMDAL_RWLOCK rwlock_t
#define HEIMDAL_RWLOCK_INITIALIZER RWLOCK_INITIALIZER
#define HEIMDAL_RWLOCK pthread_rwlock_t
#define HEIMDAL_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
#define HEIMDAL_RWLOCK_init(l) pthread_rwlock_init(l, NULL)
#define HEIMDAL_RWLOCK_rdlock(l) pthread_rwlock_rdlock(l)
#define HEIMDAL_RWLOCK_wrlock(l) pthread_rwlock_wrlock(l)
@@ -215,7 +215,7 @@ heim_rwlock_trywrlock(heim_rwlock_t *l)
return EBUSY;
}
static inline vint
static inline int
heim_rwlock_unlock(heim_rwlock_t *l)
{
if (l->exclusive) {