ahc/ahd locking

Erik Wikström Erik-wikstrom at telia.com
Mon Dec 31 02:44:47 PST 2007

On 2007-12-31 03:43, Peter Avalos wrote:
> I've attempted to bring in some locking for the ahc and ahd drivers from
> FreeBSD.  This is my first attempt with locking mechanisms, and I'd
> appreciate some input on the attached patch.
> Doing this brought along some questions:
> 1.  When should you use spinlocks instead of lockmgr locks?  Would this
> code be better with spinlocks?  If so, are there any gotchas I need to
> know about?
> 2.  tsleep->msleep.  Did I do that right, or can only spinlocks be used?

Aggelos recently added some notes about how to convert FreeBSD locks to
DFBSD locks:

Erik Wikström

More information about the Kernel mailing list