]> git.proxmox.com Git - mirror_spl-debian.git/commit - module/splat/splat-rwlock.c
Simplify rwlock implementation.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 May 2010 21:20:34 +0000 (14:20 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 20 May 2010 21:20:34 +0000 (14:20 -0700)
commit32f5faff694b30c7992181057e3028571f834d41
tree6feaf6159c82e3dde397e49954e5c370ec699204
parent23d91792efdc42779605025e15b03d63226cff6a
Simplify rwlock implementation.

Remove RW_COUNT() from the rwlock implementation.  The idea was that it
could be used as a generic wrapper for getting at the internal state
of a rwlock.  While a good idea it's proven problematic to keep it
correct for multiple archs and internal implementation changes.  In
short it hasn't been worth the trouble.

With that and simplicity in mind things have been updated to use the
rwsem_is_locked() function instead of RW_COUNT for the RW_*_HELD()
functions.  As for rw_upgrade() it remains only implemented for
the generic rwsem implemenation.  It remains to be determined if its
worth the effort of adding a custom implementation for each arch.
include/sys/rwlock.h
module/splat/splat-rwlock.c