tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rw_lock vs mutex
While digging around looking into another problem, I noticed that the
piixpm(4) driver uses an rw_lock for its ic_acquire_bus/ic_release_bus
routines. ic_acquire_bus() uses rw_enter(..., RW_WRITER) and there
doesn't appear to be any use anywhere of RW_READER for that lock.
The man page for rw_lock implies that it is a superset of a mutex. So
I'm wondering if it makes any sense to use the simpler mutex instead?
-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------
Home |
Main Index |
Thread Index |
Old Index