On Mon, 4 Feb 2008, Dag-Erling Smørgrav wrote:

Daniel Eischen <[EMAIL PROTECTED]> writes:
Dag-Erling Smørgrav <[EMAIL PROTECTED]> writes:
Daniel Eischen <[EMAIL PROTECTED]> writes:
If you want to know if the current thread has it locked, it should be
called pthread_mutex_isowned_np().
I don't see why one would be more correct than the other...
Because it is more obvious that _isowned() is for the current thread
than _islocked().  As you can tell by my previous (incorrect)
assumption.

There is prior art for this outside of FreeBSD.  Solaris has
mutex_owned() as part of their kernel mutex API.  I would suggest
using pthread_mutex_owned_np().  Hmm, even FreeBSD has mtx_owned() :-)

OK, so the next question is whether this reqires a repo-copy (or a
repo-move), or if I can just cvs rm + cvs add (both the implementation
and the regression test)

I would just remove it and readd it, since there is not history
to keep...

--
DE
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to