This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ecos 1.3.1
- To: Rafael Rodríguez Velilla <rrv at tid dot es>
- Subject: Re: [ECOS] ecos 1.3.1
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Tue, 29 May 2001 18:47:54 +0100
- Cc: ecos <ecos-discuss at sourceware dot cygnus dot com>,Nick Garnett <nickg at redhat dot com>
- Organization: Red Hat UK Ltd.
- References: <3B12731A.25F42D37@tid.es>
Rafael Rodríguez Velilla wrote:
>
> In the implementation of MLQUEUE scheduler I've found that the method
> rem_thread doesn't check if the thread that is being removed is the
> "current_thread". Shouldn't this check be done in order to raise
> "need_reschedule" when that happens?
> In the BITMAP scheme it is done.
I believe that the kernel expects the caller of rem_thread to always
manipulate the thread state to be something other than RUNNING. And given
that rem_thread should always be called with the scheduler locked, this
should force a reschedule. The bitmap scheduler is probably just overly
zealous. Nick, comments?
> Another little thing, in the method add_thread I find the following
> code:
> if (thread->queue != NULL)
> {
> thread->queue->remove(thread);
> thread->queue=NULL;
> }
>
> Isn't it true that when remove is invoqued, the member queue of the
> thread used as a parameter finishes pointing to NULL? So thread->queue
> is innecessary.
Looks like it. Nick, any comments before I change it?
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