This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: several question in ecos network stack


ÕÅ ÁÁ 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]