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: some issues relating to current_thread


Thanks Nick for your explanations,

> > [1] I didn't exactly get the comment in
> > deliver_exception function in thread.cxx.
>
> If you mean the comments in the else part, then they
mean what they
> say: provoking another thread to take an exception
is not supported,
> for the reasons given. I'm not sure what is unclear
here.

Two situation where the condition

"if( this == Cyg_Scheduler::get_current_thread() )"

will fail I could figure out earlier..(as mentioned in
[2]) but couldn't get the idea of when one thread
would deliberately like to deliver exception to
itself, to some other thread? and why would that be
required if whenever required? This is what didn't
become clear to me.

> > [2] In current implementation of setting the 
> --- snipped --
> None of this is a problem. In all cases the thread
has taken the
> scheduler lock, so no other thread can preempt it,
and current_thread
> gets set correctly before the lock is released. None
of the
> scheduler or thread switch code does anything that
would cause an
> exception, and if one did occur in this code it is
indicative of
> serious corruption, so any attempt to handle it is
probably doomed.

I am still going through the code, but as I get from
your mail, interrupts
can still come. Is there any interrupt related code
that can refer to
current_thread? I guess.. all the ecos design/code you
have done will
not have such situations..

> > and interrupts are kept diabled during context
switch?
> But this would only stop interrupts, it would have
no effect on
> exceptions.
This brings me to another naive question, as I am not
much aware of
architectures other than Intel, are all the hardware
designs are same way?

brij


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

-- 
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]