This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Nested calls to Mutexes
- To: Rosimildo daSilva <rosimildo at hotmail dot com>
- Subject: Re: [ECOS] Nested calls to Mutexes
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 22 Mar 2001 16:46:30 +0000
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <F309LwxTQTYkWSzsVA2000068c5@hotmail.com>
[ Sent this yesterday but it bounced! ]
Rosimildo daSilva wrote:
>
> Many implementations out there support the concept of
> nested/balanced mutex calls. That is the programmer's
> expectation. Sorry, to put this way, but I consider
> this a *bug*.
POSIX doesn't. Quite the opposite in fact, and that's hardly an obscure
standard....
"An attempt by the current owner of a mutex to relock the mutex results in
undefined behavior".
And "undefined behavior" means anything from the recursive mutexes you want
to contacting NORAD with the missile codes to start World War III.
So don't do this, the world is in your hands. :-)
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine