DragonFly kernel List (threaded) for 2007-12
DragonFly BSD
DragonFly kernel List (threaded) for 2007-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ahc/ahd locking


From: Erik Wikström <Erik-wikstrom@xxxxxxxxx>
Date: Mon, 31 Dec 2007 11:44:47 +0100

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:
http://www.dragonflybsd.org/cvsweb/doc/notes/porting_drivers.txt

-- 
Erik Wikström



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]