public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Bart Veer <bartv@redhat.com>
To: rosimildo@hotmail.com
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] Nested calls to Mutexes
Date: Wed, 21 Mar 2001 05:29:00 -0000	[thread overview]
Message-ID: <200103211329.f2LDTSi02939@sheesh.cambridge.redhat.com> (raw)
In-Reply-To: <F309LwxTQTYkWSzsVA2000068c5@hotmail.com>

>>>>> "Rosimildo" == Rosimildo daSilva <rosimildo@hotmail.com> writes:

    Rosimildo> Hi, the project I am working on, we have faced a small problem
    Rosimildo> with mutexes.

    >> From ecos documentation:

    Rosimildo> "When a thread locks a mutex it becomes the owner. Only
    Rosimildo> the mutex's owner may unlock it. While a mutex remains
    Rosimildo> locked, the owner should not lock it again, as the
    Rosimildo> behavior is undefined and probably dangerous. "

    Rosimildo> I disagree with this statement. It is a *common idiom*
    Rosimildo> to have routines that needs to "lock" some access to
    Rosimildo> start calling other routines that "locks" the mutex
    Rosimildo> again. In any sizeable project, this happens
    Rosimildo> eventually. As long as the acquire()/release() calls
    Rosimildo> are balanced, it should be no problem.

This issue has been raised before. See e.g.
http://sources.redhat.com/ml/ecos-discuss/2000-06/msg00333.html
and
http://sources.redhat.com/ml/ecos-discuss/2000-08/msg00061.html

There are no plans to change eCos' behaviour in this respect.

Bart

  reply	other threads:[~2001-03-21  5:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21  5:18 Rosimildo daSilva
2001-03-21  5:29 ` Bart Veer [this message]
2001-03-21  5:42 ` Jonathan Larmour
2001-03-21  6:26   ` Andrew Lunn
2001-03-21  6:45     ` Lewin A.R.W. Edwards
2001-03-22  8:46 ` Jonathan Larmour
2001-04-04  8:08   ` martin
2001-04-04  8:17     ` Jonathan Larmour
2001-03-21  6:06 Rosimildo daSilva
2001-03-21  6:54 Rosimildo daSilva
2001-04-04 18:29 Rosimildo daSilva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200103211329.f2LDTSi02939@sheesh.cambridge.redhat.com \
    --to=bartv@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=rosimildo@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).