Date: Sun, 29 Aug 2010 21:37:22 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r211975 - head/sbin/hastd Message-ID: <201008292137.o7TLbMks075120@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008292137.o7TLbMks075120>