[ofw][patch] mcast garbage collector

Fab Tillier ftillier at windows.microsoft.com
Wed Jul 2 09:06:27 PDT 2008


>>You know, I think it would make a lot more sense to create the garbage
>>collector thread when you initialize the port object.  It really
>>simplifies the error handling.
>
>Port needs garbage collector when it's in ACTIVE state. If port is
>disconnected, no need to keep garbage collector thread. That's why
>initialization and destruction are in port_up and port_down callbacks.

I'm just looking for ways to minimize error paths.  Would using a timer and DPC work?  You wouldn't need to set the timer until the port becomes active, and you can set the timer to be periodic using KeSetTimerEx.  You could then perform the garbage collection from the timer's DPC callback (I didn't see any code in the garbage collection that would prevent things from working at DISPATCH_LEVEL.)

-Fab



More information about the ofw mailing list