Implement mtx_destroy() and rw_destroy().

MFC after:	2 weeks
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com
This commit is contained in:
pjd 2010-08-29 21:37:21 +00:00
parent 662ba753ab
commit 4a3477caff

View File

@ -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;