Marko Mäkelä schrieb: > On Wed, Sep 20, 2006 at 10:20:49AM +0200, Martin Wache wrote: >> I would suggest to check what osdMutex is actually protecting, in some >> places I really don't know that. So for protecting what is the osdMutex >> needed? > > It might be a good idea to try running softdevice under Helgrind, > which implements the Eraser algorithm for detecting data races. > I never worked with Helgrind, but maybe I will it give a try.
> FWIW, a good design principle would be to avoid deadlocks by avoiding > cycles in the waits-for graph altogether. This can be achieved by having > all threads acquire mutexes in the same order (and to release them in the > opposite order in a stack-like fashion). Assign a rank to each mutex, > and make sure that each thread can acquire only mutexes of lower rank > than those it is currently holding. > Sure, ranks for all mutexes would help to solve those problems. But I don't think we actually need them, cVideo is just not complicated enough ;-). We currently have two mutexes in cVideo, I actually don't think that we need both of them. If we can get rid of one of them, we should not have any problems with deadlocks. If some videout driver needs locks to protect calls to actual drivers, thats not a problem as long as no other methods of cVideo are called with the lock held. Bye, Martin _______________________________________________ Softdevice-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/softdevice-devel
