On 06-06-10 18:55 Daniel Drake wrote: > My only concern about this approach is that the locking in the > disconnect path may *hide* race conditions to a certain extent. The > races would still happen, we'd still see use-after-free, but they might > be less obvious unless caught early. Still, I guess that any races here > are unlikely.
Now I understand your point. You are saying at this point in time, we shouldn't have any races anymore and therefore we don't need the locks. And this is alright because it is our responsibility to shut down all "racers" before. How about following approach? We are including an ASSERT testing the lock in zd_mac_clean() and other related functions. I would also suggest to make a ZD_CLEAR macro with the same interface as memset, which only results in code if the macro DEBUG is set. Cheers, Uli -- Uli Kunitz _______________________________________________ Zd1211-devs mailing list - http://zd1211.ath.cx/ Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs