Preventing deadlocks on the event queue.

Pawel Jakub Dawidek nick at garage.freebsd.pl
Mon Jan 26 08:12:10 PST 2004


On Mon, Jan 26, 2004 at 04:50:38PM +0100, Lukas Ertl wrote:
+> > So, I think I've found clever way to prevents deadlock caused by
+> > calling g_waitfor_event() from an event.
+> >
+> > My idea is to check if curthread in g_waitfor_event() is a g_event thread.
+> >
+> > 	http://garage.freebsd.pl/patches/geom_event_deadlock.patch
+> 
+> Do you really want to make this a separate function?  Since it's just a
+> one-line comparison, wouldn't a macro suffice?

I want to avoid exporting 'g_event_proc' from geom_kern.c (it is declareted
staticaly there).

-- 
Pawel Jakub Dawidek                       pawel at dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20040126/64c200d9/attachment.bin


More information about the freebsd-geom mailing list