Hi Manish,

Pls. quote the source references ;)

Shown code is from BSD sources, src/sys/fs/ntfs/ntfs_subr.c,
function ntfs_ntput(), just so others know where to look ...

BSD's "mtx locks" are the same as Solaris mutexes. The term stands
for "MUTually EXclusive", hence yes these are single-owner exclusive
locks. You can use mutex_enter/mutex_exit in Solaris where BSD code
uses mtx_lock/mtx_unlock.
One nit: No recursive mutexes in kernel land on Solaris !


The BSD "lockmgr locks" are something for which a 1:1 Solaris equivalent
doesn't exist. Solaris rwlocks, see manpage rwlock(9F), have overlapping
functionality but are not a drop-in replacement. In some cases, it might
be necessary on Solaris to use a mutex/condvar/state tuple instead of an
rwlock to implement part of the BSD lockmgr functionality.
Compare the two via:

BSD shared/exclusive locks, see lockmgr(9) BSD manpage:

        http://www.freebsd.org/cgi/man.cgi?query=lockmgr&sektion=9

Solaris kernel rwlocks, see rwlock(9F) Solaris manpage:

        http://docs.sun.com/app/docs/doc/816-5180/6mbbf02lh?a=view

Solaris kernel condition variables, see condvar(9F) Solaris manpage:

        http://docs.sun.com/app/docs/doc/816-5180/6mbbf01tl?a=view

You'll have to check case-by-case how to move BSD lockmgr code to
Solaris rwlocks.


Best regards,
FrankH.

_______________________________________________
ufs-discuss mailing list
[email protected]

Reply via email to