apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Ghent <da...@elemental.org>
Subject Re: nested mutexes
Date Tue, 19 Jun 2001 13:01:07 GMT
On 19 Jun 2001, Jeff Trawick wrote:

| no, by "nested mutex" I mean that this is allowed
| Thread A holds mutex 1
| Thread A obtains mutex 1 again
| what I call "nested mutex acquire" is sometimes called "recursive
| mutex acquire"

Wouldnt an attempt to aquire a mutex that is already owned (by the
calling thread or another thread) fail with EDEADLK, so anything obtaining
something more than once is not possible without error?

Perhaps something like a "mutex keychain" would be good to help a thread
keep track of mutexes it currently owns/are globaly owned so that attempts
to aquire owned ones would be thwarted?


View raw message