On Sun, Aug 22, 2010 at 01:41:54AM +0000, Jacob Meuser wrote: > this is in the device task loop to catch that: > > > > + if (!TAILQ_EMPTY(&usb_hub_tasks)) > > > + break;
Ahh, I missed that. So yes, that's fine then, just the code can be simplified a bit. :) > that's a good question. the current code doesn't deal with that. > in fact, the current code doesn't even try to stop the thread. Perhaps this diff should not worry about stopping the thread either and just fix the discover prioritization issue? However, I suspect that by time the thread is being destroyed, all of the tasks should have already been removed. So perhaps a few KASSERT(TAILQ_EMPTY(...)) statements somewhere would be appropriate.
