ahc/ahd locking

Peter Avalos pavalos at theshell.com
Tue Jan 1 18:20:55 PST 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20080101/49e362e2/attachment-0013.obj>


More information about the Kernel mailing list