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

Re: ahc/ahd locking


From: Peter Avalos <pavalos@xxxxxxxxxxxx>
Date: Tue, 1 Jan 2008 21:15:51 -0500
Mail-followup-to: kernel@crater.dragonflybsd.org

On Tue, Jan 01, 2008 at 11:20:47AM +0800, Sepherosa Ziehau wrote:
> >
> > 2. How should the tsleep()s be handled?
> 
> Assum serializer 'ser' is held.
> 
> ...
> /* Your code */
> ...
> crit_enter();
> tsleep_interlock(your_cond);
> lwkt_serialize_exit(ser);
> error = tsleep(your_cond, 0, "name", to);
> crit_exit();
> lwkt_serialize_enter(ser);
> ...
> /* Your code */
> ...
> 

tsleep_interlock()...cool.

--Peter

Attachment: pgp00000.pgp
Description: PGP signature



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