OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: sbt/sdmmc locking update

From: Matthew Dempsky (matthewdempsky.org)
Date: Sat Aug 21 2010 - 19:21:20 CDT


On Sat, Aug 21, 2010 at 10:04 AM, Bret S. Lambert <blambertopenbsd.org> wrote:
> This diff changes the locking in sbt and sdmmc from the old-and-busted
> lockmgr locks to the new-hotness rwlock locks. I don't have the
> hardware to test this on, so anybody with sbt/sdmmc is encouraged
> to give it a spin.

Why not simply change the SDMMC_LOCK/SDMMC_UNLOCK/SDMMC_ASSERT_LOCKED
macros and leave the .c files untouched (other than the lock init)?

Also, I'd prefer rw_exit_write() be used instead of rw_exit() when you
know you're holding a write lock.