Author: pjd
Date: Sun Aug 29 21:37:21 2010
New Revision: 211975
URL: http://svn.freebsd.org/changeset/base/211975

Log:
  Implement mtx_destroy() and rw_destroy().
  
  MFC after:    2 weeks
  Obtained from:        Wheel Systems Sp. z o.o. http://www.wheelsystems.com

Modified:
  head/sbin/hastd/synch.h

Modified: head/sbin/hastd/synch.h
==============================================================================
--- head/sbin/hastd/synch.h     Sun Aug 29 21:05:34 2010        (r211974)
+++ head/sbin/hastd/synch.h     Sun Aug 29 21:37:21 2010        (r211975)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to