From owner-svn-src-all@FreeBSD.ORG Sun Aug 29 21:37:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C46F1065674; Sun, 29 Aug 2010 21:37:22 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1468FC08; Sun, 29 Aug 2010 21:37:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7TLbMSK075122; Sun, 29 Aug 2010 21:37:22 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7TLbMks075120; Sun, 29 Aug 2010 21:37:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201008292137.o7TLbMks075120@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 29 Aug 2010 21:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211975 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2010 21:37:22 -0000 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;