This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: several question in ecos network stack
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: =?GB2312?B?1cUgwcE=?= <johnsonest at hotmail dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 07 Jan 2003 21:05:58 +0000
- Subject: Re: [ECOS] several question in ecos network stack
- References: <F147HHPFemzALotVQPn000145b7@hotmail.com>
ÕÅ ÁÁ wrote:
> Dear Gary Thomas and others!
> I have several questions in ecos network stack: 1 as we know,ecos
> modified struct ifnet in BSD: considering device driver and logical
> interface as a whole interface,I think it's a good idea.but when init a
> interface,ecos let (*if_reset) and (*if_watchdog)=NULL,will it involve
> problems? 2 ecos use only one spl_mutex to prevent many resource,it
> will add overhead and destroy priority partially,for example,one thread
> access resource A,at the monmoment,another higher thread need to access
> resource B,latter must wait to former,although it has a higher priority.
> how does designer think? 3 (re)write cyg_wakeup() and cyg_tsleep()
> for what? could you give me some explanation?
I think Hugo was the one who designed the mutex system as it currently
stands, but I might well be wrong.
Unless I'm mistaken it's just a fact that it doesn't respect priority
because of the monolithic nature of the stack - it assumes a
non-preemptive execution inside the BSD kernel.
It's just like any shared resource - if there can only be one user then
the priority is irrelevant. The most you can hope for is that if there is
a queue of threads waiting for the resource, the highest pri one wins.
Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss