summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-29 21:37:21 +0000
committerpjd <pjd@FreeBSD.org>2010-08-29 21:37:21 +0000
commit4a3477caff76069b800be71fe6f98105ad52d6e7 (patch)
tree27b0d27e32b3cad563334d9352c456738093bd37 /sbin
parent662ba753ab5d09fc8bf345605c99cc585dfab8c2 (diff)
downloadFreeBSD-src-4a3477caff76069b800be71fe6f98105ad52d6e7.zip
FreeBSD-src-4a3477caff76069b800be71fe6f98105ad52d6e7.tar.gz
Implement mtx_destroy() and rw_destroy().
MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/synch.h16
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;
OpenPOWER on IntegriCloud