Re: [PATCH] Robust and Real-time Mutexes in NPTL
Carlo Wood <[email protected]>
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 02, 2003 at 05:17:50PM -0700, Perez-Gonzalez, Inaky wrote: > Well, still, this falls into the realm of "don't do that". > Doing that is a bug in your program if it does not allow > it, and this kind of defensive programming would take > too many resources to implement. If you think that way then debugging is never needed: just never 'do that', whatever it is that causes bugs. Unfortunately that is not how Real Life works. Dead-locks occur and those that are most hard to find are those that only seldom occur (not during testing anyway)... My method WILL, most likely, detect them during the testing phase however. As I said - I have implemented this for my project libcwd and it has greatly helped me to debug the locking of that library. Of course, it eats some resources; you don't want to turn this kind of testing on in a production environment. But it would be a great tool for developers, allowing them to detect possible deadlocks in a very early stage. -- Carlo Wood <[email protected]>