diff options
-rw-r--r-- | sbin/hastd/synch.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sbin/hastd/synch.h b/sbin/hastd/synch.h index 006b0e7..1dda49d 100644 --- a/sbin/hastd/synch.h +++ b/sbin/hastd/synch.h @@ -48,6 +48,14 @@ mtx_init(pthread_mutex_t *lock) assert(error == 0); } static __inline void +mtx_destroy(pthread_mutex_t *lock) +{ + int error; + + error = pthread_mutex_destroy(lock); + assert(error == 0); +} +static __inline void mtx_lock(pthread_mutex_t *lock) { int error; @@ -88,6 +96,14 @@ rw_init(pthread_rwlock_t *lock) assert(error == 0); } static __inline void +rw_destroy(pthread_rwlock_t *lock) +{ + int error; + + error = pthread_rwlock_destroy(lock); + assert(error == 0); +} +static __inline void rw_rlock(pthread_rwlock_t *lock) { int error; |