From: danc@iobjects.com (Dan Conti)
To: "Jonathan Larmour" <jlarmour@redhat.com>,
<ecos-discuss@sources.redhat.com>
Subject: RE: [ECOS] Unique priorities
Date: Thu, 11 Jan 2001 09:31:00 -0000 [thread overview]
Message-ID: <LHEHKGCFEPABLCKPPMGLOEPCCBAA.danc@iobjects.com> (raw)
In-Reply-To: <3A5DE5C4.33B37AA0@redhat.com>
From what i can see, it does a ++ on the priority if the given priority is
taken (from bitmap.cxx):
Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation
(
CYG_ADDRWORD sched_info
)
{
CYG_REPORT_FUNCTION();
#if 1
// Assign this thread's priority to the supplied sched_info
// or the next highest priority available.
priority = cyg_priority(sched_info);
while( !Cyg_Scheduler::scheduler.unique(priority) )
priority++;
#else
// Assign initial priorities to threads in descending order of
// creation.
static cyg_priority init_priority = 0;
priority = init_priority++;
#endif
}
-Dan
-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[ mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Jonathan
Larmour
Sent: Thursday, January 11, 2001 8:57 AM
To: Jesper Skov
Cc: Paleologos Spanos; ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Unique priorities
Jesper Skov wrote:
>
> >>>>> "Paleologos" == Paleologos Spanos <paleolog@ee.ucla.edu> writes:
> Paleologos> mlqueues default scheduler). I would expect that I would
> Paleologos> have an error or something like that because of the fact
> Paleologos> that the 2 threads are having the same priority (4).Is it
> Paleologos> correct or I have misunderstood something?
>
> The bitmap scheduler will assign a thread the closest possible
> priority to that requested. It does not fail if the requested priority
> is already used, it just returns another. So your threads would
> probably have priorities 4 and 5.
Jesper are you sure about that? From bitmap.cxx
void Cyg_Scheduler_Implementation::add_thread(Cyg_Thread *thread)
{
CYG_REPORT_FUNCTION();
CYG_ASSERT((CYG_THREAD_MIN_PRIORITY >= thread->priority)
&& (CYG_THREAD_MAX_PRIORITY <= thread->priority),
"Priority out of range!");
CYG_ASSERT( thread_table[thread->priority] == NULL ||
thread_table[thread->priority] == thread,
"Duplicate thread priorities" );
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine
prev parent reply other threads:[~2001-01-11 9:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-10 16:25 Paleologos Spanos
2001-01-10 23:53 ` Jesper Skov
2001-01-11 8:56 ` Jonathan Larmour
2001-01-11 9:15 ` Nick Garnett
2001-01-11 9:31 ` Jesper Skov
2001-01-11 9:35 ` Jonathan Larmour
2001-01-11 9:31 ` Dan Conti [this message]
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=LHEHKGCFEPABLCKPPMGLOEPCCBAA.danc@iobjects.com \
--to=danc@iobjects.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=jlarmour@redhat.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).