public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Hugo Tyson <hmt@redhat.com>
To: "eCos Disuss" <ecos-discuss@sourceware.cygnus.com>
Subject: Re: [ECOS] mutex operation
Date: Tue, 03 Jul 2001 06:57:00 -0000	[thread overview]
Message-ID: <wwtlmm6azh0.fsf@masala.cambridge.redhat.com> (raw)
In-Reply-To: <NEBBKCPHAKKLBOKILBONOEGBCDAA.Andy.Simpkins@TardisMobile.com>

"Andy Simpkins" <Andy.Simpkins@TardisMobile.com> writes:
> Just a short question on the use of Mutexes as the documentation does not
> seem clear...
> 
> If I use a mutex to protect a resource in both a thread and inside a DSR
> will the eCos scheduler promote the thread's priority to greater than
> that of the DSR in the event that the thread has locked the resource and
> the DSR is waiting on that resource?

Nope.  You must not use a mutex within a DSR, because attempting to acquire
the mutex can cause the caller to block.  DSRs must not block.

Priority does not really apply to DSRs and interrupts:

All interrupts (ISRs) (when enabled and unmasked) have higher priority than
all DSRs and all threads.
All DSRs have higher priority than all threads.
Threads have numerical priority amongst themselves.
Depending on hardware implementation, interrupts might have a numerical
proprity amongst themselves - more often it is fixed by the hardware.
DSRs are just all run in arbitrary order as soon as possible, as soon as it
is safe to do so.

HTH,
	- Huge

  reply	other threads:[~2001-07-03  6:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-03  6:45 Andy Simpkins
2001-07-03  6:57 ` Hugo Tyson [this message]
2001-07-03  7:25   ` Andy Simpkins
2001-07-03  8:05     ` Andy Simpkins

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=wwtlmm6azh0.fsf@masala.cambridge.redhat.com \
    --to=hmt@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.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).