Preventing deadlocks on the event queue.

Lukas Ertl l.ertl at univie.ac.at
Mon Jan 26 07:53:15 PST 2004


On Mon, 26 Jan 2004, Pawel Jakub Dawidek wrote:

> Hello.
>
> 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?

regards,
le

-- 
Lukas Ertl                             eMail: l.ertl at univie.ac.at
UNIX Systemadministrator               Tel.:  (+43 1) 4277-14073
Vienna University Computer Center      Fax.:  (+43 1) 4277-9140
University of Vienna                   http://mailbox.univie.ac.at/~le/


More information about the freebsd-geom mailing list