Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2008 19:50:39 +0000
From:      Andrew Doran <ad@netbsd.org>
To:        freebsd-threads@freebsd.org
Subject:   Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c
Message-ID:  <20080207195039.GF21558@hairylemon.org>

next in thread | raw e-mail | index | archive | help
>   Log:
>   Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is
>   locked.  This is intended primarily to support the userland equivalent
>   of the various *_ASSERT_LOCKED() macros we have in the kernel.

For what it's worth, NetBSD has the below. I found the names in FreeBSD
perforce using Google and used them in the hope of being compatible. :-)
I didn't find equivalents in other systems when I looked.

int     pthread_mutex_held_np(pthread_mutex_t *);
int     pthread_rwlock_held_np(pthread_rwlock_t *);
int     pthread_rwlock_wrheld_np(pthread_rwlock_t *);
int     pthread_rwlock_rdheld_np(pthread_rwlock_t *);

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080207195039.GF21558>